You are not logged in.

#1 2010-09-17 00:25:34

echasslau
Member
Registered: 2007-09-21
Posts: 113

Network speed per connection

Hi.

I created a small command to monitor my network speed with conky:

netstat -taupe | grep ESTABLISHED | tr -s " " | sed "s|\(\S*\)\s\(\S*\)\s\(\S*\)\s\S*:\(\S*\)\s\(\S*\)\s\(\S*\)\s\(\S*\)\s\(\S*\)\s\(\S*\)|\2 \3 :\4 \5 \9|" | column -t | sort -r
0  0  :52725  channel27.01.0:www-http  27750/pidgin
0  0  :41564  mirrors2.kernel.org:ftp  28978/wget
0  0  :39694  fritz.box:1012           27791/ffgtk
0  0  :32945  mirrors2.kernel.o:57747  28978/wget

The problem is that my 600k wget connection is always shown with 0k. Is there a better working solution for that?

Thanks in advance.
Andreas

Offline

#2 2010-09-17 01:17:33

codycarey
Member
Registered: 2009-08-21
Posts: 154

Re: Network speed per connection

Doesn't conky have a few built-in variables for network speed?

Offline

#3 2010-09-17 07:57:00

echasslau
Member
Registered: 2007-09-21
Posts: 113

Re: Network speed per connection

but not per connection/program i think

Offline

#4 2010-09-17 21:50:29

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Network speed per connection

You would probably have to cross reference the same info iftop uses with the information from netstat to make the correspondence data stream <-> program. Mind you that any program can have a few instances downloading/uploading data so you may have to sum them.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB