Following files/dirs can be directly read:
/proc/net/dev
/sys/class/net/<if_name>/
/sys/class/net/<if_name>/statistics
Tool netstat is your friend to get network-related information:
netstat -I # display interface info
netstat -s # display statistics info
netstat -r # display routing info
netstat -tlnp # display TCP listening info
Other tools: sar, ifconfig, iftop
No comments:
Post a Comment