From 4d3caf1643e085a1066dbe4793632a82d5d50a89 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 16 Aug 2019 17:29:02 +0800 Subject: [PATCH] update info --- component/session/server.go | 5 ++--- component/session/utils.go | 9 --------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/component/session/server.go b/component/session/server.go index fa82634..5f7a924 100644 --- a/component/session/server.go +++ b/component/session/server.go @@ -92,20 +92,19 @@ table, th, td { text-align: right; padding: 4; }Go-tun2socks Monitor`) - _, _ = fmt.Fprintf(w, "

Go-tun2socks %s

", C.Version) // Statistics table _, _ = fmt.Fprintf(w, "

Statistics (%d)

", runtime.NumGoroutine()) _, _ = fmt.Fprintf(w, "") - _, _ = fmt.Fprintf(w, "\n") + _, _ = fmt.Fprintf(w, "\n") trafficUp := atomic.LoadInt64(&s.trafficUp) trafficDown := atomic.LoadInt64(&s.trafficDown) _, _ = fmt.Fprintf(w, "\n", date(time.Now()), platform(), + C.Version, cpu(), mem(), - disk(), uptime(), byteCountSI(trafficUp+trafficDown), byteCountSI(trafficUp), diff --git a/component/session/utils.go b/component/session/utils.go index 992e5f5..623aa0c 100644 --- a/component/session/utils.go +++ b/component/session/utils.go @@ -6,7 +6,6 @@ import ( "time" C "github.com/shirou/gopsutil/cpu" - D "github.com/shirou/gopsutil/disk" H "github.com/shirou/gopsutil/host" M "github.com/shirou/gopsutil/mem" ) @@ -25,14 +24,6 @@ func cpu() string { return fmt.Sprintf("%.1f%%", c[0]) } -func disk() string { - d, err := D.Usage("/") - if err != nil { - return "N/A" - } - return fmt.Sprintf("%.1f%%", d.UsedPercent) -} - func platform() string { h, err := H.Info() if err != nil {
Last Refresh TimePlatform VersionCPUMemDiskUptimeTotalUploadDownload
Last Refresh TimePlatform VersionGo-tun2socks VersionCPUMemUptimeTotalUploadDownload
%v%v%v%v%v%v%v%v%v