Posts Walking /proc/net/netstat like a pro with awk
Post
Cancel

Walking /proc/net/netstat like a pro with awk

Little command to parse /proc/net/netstat and format the output:

1
2
3
4
5
6
7
$ awk '{for(i=1;i<=NF;i++)title[i] = $i; getline; print title[1]; for(i=2;i<=NF;i++)printf " %s: %s\n", title[i], $i }' /proc/net/netstat

TcpExt:
 ...
IpExt:
 ...


Source:

alternative to “netstat -s”

OLDER POST NEWER POST

Comments powered by Disqus.

Search Results