fix NetIOCounters on linux

This commit is contained in:
Nikolay Sivko 2014-08-18 11:14:26 +04:00
parent 026f5023a8
commit ba09a0f5ac
1 changed files with 3 additions and 2 deletions

View File

@ -25,8 +25,9 @@ func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
nic := NetIOCountersStat{
Name: strings.Trim(fields[0], ":"),
BytesRecv: mustParseUint64(fields[1]),
Errin: mustParseUint64(fields[2]),
Dropin: mustParseUint64(fields[3]),
PacketsRecv: mustParseUint64(fields[2]),
Errin: mustParseUint64(fields[3]),
Dropin: mustParseUint64(fields[4]),
BytesSent: mustParseUint64(fields[9]),
PacketsSent: mustParseUint64(fields[10]),
Errout: mustParseUint64(fields[11]),