Perferably in PERL, what's the best way to get the in/out bytes from the NIC on Linux ?
With FreeBSD I open a file/pipe to 'netstat -in 1' and read a few lines.
Printable View
Perferably in PERL, what's the best way to get the in/out bytes from the NIC on Linux ?
With FreeBSD I open a file/pipe to 'netstat -in 1' and read a few lines.
Don't know PERL, sorry.
"netstat -ei" or perhaps (more program friendly) "cat /proc/net/dev" ? (or system calls... if available?)