NetDev returns kernel/system statistics read from /proc/[pid]/net/dev.
()
| 54 | |
| 55 | // NetDev returns kernel/system statistics read from /proc/[pid]/net/dev. |
| 56 | func (p Proc) NetDev() (NetDev, error) { |
| 57 | return newNetDev(p.path("net/dev")) |
| 58 | } |
| 59 | |
| 60 | // newNetDev creates a new NetDev from the contents of the given file. |
| 61 | func newNetDev(file string) (NetDev, error) { |