Merge pull request #125 from okmeter/fix_net_io_counters_freebsd
[net] fix panic on freebsd (netstat error with exit code 0)
This commit is contained in:
commit
76c6e2ccc8
|
@ -32,6 +32,9 @@ func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
|||
}
|
||||
exists = append(exists, values[0])
|
||||
|
||||
if len(values) < 12 {
|
||||
continue
|
||||
}
|
||||
base := 1
|
||||
// sometimes Address is ommitted
|
||||
if len(values) < 13 {
|
||||
|
|
Loading…
Reference in New Issue