Skip to content

Commit

Permalink
Merge pull request #125 from okmeter/fix_net_io_counters_freebsd
Browse files Browse the repository at this point in the history
[net] fix panic on freebsd (netstat error with exit code 0)
  • Loading branch information
shirou committed Dec 12, 2015
2 parents 123e227 + 906df3e commit 76c6e2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/net_freebsd.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 76c6e2c

Please sign in to comment.