diff options
| author | MHSanaei <mc.sanaei@gmail.com> | 2023-02-16 18:58:20 +0300 |
|---|---|---|
| committer | MHSanaei <mc.sanaei@gmail.com> | 2023-02-16 18:58:20 +0300 |
| commit | fe9844b51b04bb924bb0e5444b493668c9df92a2 (patch) | |
| tree | f32156eff095434b2e256630d4b2ddf8ea5715d2 /web/service/server.go | |
| parent | 30611383de06c9a97e3cbb8fcf1bbe531846f6b2 (diff) | |
update pack
Diffstat (limited to 'web/service/server.go')
| -rw-r--r-- | web/service/server.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/web/service/server.go b/web/service/server.go index efd985e6..c0a8e9d2 100644 --- a/web/service/server.go +++ b/web/service/server.go @@ -15,12 +15,12 @@ import ( "x-ui/util/sys" "x-ui/xray" - "github.com/shirou/gopsutil/cpu" - "github.com/shirou/gopsutil/disk" - "github.com/shirou/gopsutil/host" - "github.com/shirou/gopsutil/load" - "github.com/shirou/gopsutil/mem" - "github.com/shirou/gopsutil/net" + "github.com/shirou/gopsutil/v3/cpu" + "github.com/shirou/gopsutil/v3/disk" + "github.com/shirou/gopsutil/v3/host" + "github.com/shirou/gopsutil/v3/load" + "github.com/shirou/gopsutil/v3/mem" + "github.com/shirou/gopsutil/v3/net" ) type ProcessState string @@ -143,7 +143,7 @@ func (s *ServerService) GetStatus(lastStatus *Status) *Status { } else { logger.Warning("can not find io counters") } - + status.TcpCount, err = sys.GetTCPCount() if err != nil { logger.Warning("get tcp connections failed:", err) @@ -153,7 +153,7 @@ func (s *ServerService) GetStatus(lastStatus *Status) *Status { if err != nil { logger.Warning("get udp connections failed:", err) } - + if s.xrayService.IsXrayRunning() { status.Xray.State = Running status.Xray.ErrorMsg = "" |
