|
|
@ -63,17 +63,17 @@ func getNetDevStats(ignore *regexp.Regexp, accept *regexp.Regexp, logger log.Log |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
devStats := map[string]string{} |
|
|
|
netDev[dev] = map[string]string{ |
|
|
|
devStats["receive_packets"] = strconv.Itoa(int(data.Ipackets)) |
|
|
|
"receive_packets": strconv.Itoa(int(data.Ipackets)), |
|
|
|
devStats["transmit_packets"] = strconv.Itoa(int(data.Opackets)) |
|
|
|
"transmit_packets": strconv.Itoa(int(data.Opackets)), |
|
|
|
devStats["receive_errs"] = strconv.Itoa(int(data.Ierrors)) |
|
|
|
"receive_errs": strconv.Itoa(int(data.Ierrors)), |
|
|
|
devStats["transmit_errs"] = strconv.Itoa(int(data.Oerrors)) |
|
|
|
"transmit_errs": strconv.Itoa(int(data.Oerrors)), |
|
|
|
devStats["receive_bytes"] = strconv.Itoa(int(data.Ibytes)) |
|
|
|
"receive_bytes": strconv.Itoa(int(data.Ibytes)), |
|
|
|
devStats["transmit_bytes"] = strconv.Itoa(int(data.Obytes)) |
|
|
|
"transmit_bytes": strconv.Itoa(int(data.Obytes)), |
|
|
|
devStats["receive_multicast"] = strconv.Itoa(int(data.Imcasts)) |
|
|
|
"receive_multicast": strconv.Itoa(int(data.Imcasts)), |
|
|
|
devStats["transmit_multicast"] = strconv.Itoa(int(data.Omcasts)) |
|
|
|
"transmit_multicast": strconv.Itoa(int(data.Omcasts)), |
|
|
|
devStats["receive_drop"] = strconv.Itoa(int(data.Iqdrops)) |
|
|
|
"receive_drop": strconv.Itoa(int(data.Iqdrops)), |
|
|
|
netDev[dev] = devStats |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return netDev, nil |
|
|
|
return netDev, nil |
|
|
|
} |
|
|
|
} |
|
|
|