1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

using HostProc for protocounters in linux

This commit is contained in:
Matt Holcomb 2015-12-10 16:37:36 +00:00
parent fc932d9090
commit 21ccfe6b60

View File

@ -116,7 +116,7 @@ func NetProtoCounters(protocols []string) ([]NetProtoCountersStat, error) {
protos[p] = true
}
filename := "/proc/net/snmp"
filename := common.HostProc("net/snmp")
lines, err := common.ReadLines(filename)
if err != nil {
return nil, err