nethogs is a linux process bandwidth monitoring tool. https://github.com/raboof/nethogs
nethogs -t
it's output looks like this.
Refreshing:
sshd: root@pts/0/4002/0 0.185156 0.0773437
unknown TCP/0/0 0 0
Refreshing:
sshd: root@pts/0/4002/0 0.220703 0.0902344
unknown TCP/0/0 0 0
Refreshing:
sshd: root@pts/0/4002/0 0.217578 0.0902344
unknown TCP/0/0 0 0
I'm trying to to parse it's outout with awk.
nethogs -t | awk {'print $0}'
returns no output :-(
nethogs -t | awk {'readline tmp; print tmp}'
much the same ;
I presume it's the way nethogs is buffering it's output or some other quirky way it's writing it's output.
nethogs -t | awk -W interactive '{print $2}'
i get some output, but it's not working as expected.
I've tried playing with awk's RS and FS settings, but no luck.