pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Hint: tcptrack to see individual connection bandwidth


From: Duncan
Subject: [Pan-users] Hint: tcptrack to see individual connection bandwidth
Date: Fri, 21 Nov 2008 11:28:49 +0000 (UTC)
User-agent: Pan/0.133 (House of Butterflies)

Today I chanced across a new app, tcptrack.  It's a terminal interface 
app, so would run in a terminal window or in a text VC.  It displays open 
tcp connections and their average bandwidth if active or their idle time 
otherwise, as well as client and server IPs, in a top reminiscent 
display.  This of course has a number of uses, but the one that came to 
mind here and why I'm posting to the list is its use for monitoring the 
individual bandwidth various pan connections are using.

tcptrack uses the pcap library for capture, and will require either run 
as root or set SUID root in most cases.  It normally puts the interface 
you attach it to in promiscuous mode and can thus track any connections 
that go by it on a WLAN or hub based wired Ethernet connection, not just 
those of its own machine, altho that can be disabled.

The only caveat is with connections open before tcptrack is run.  Since 
it only tracks them by packet capture, unlike say netstat, it won't see 
entirely idle connections established before it was run.  Until it sees a 
packet on the connection, it doesn't know it's there.  With such 
connections it also has no way of knowing for sure which IP is the server 
and which is the client end, so it guesses for purposes of display, 
assuming that the IP associated with the lower numbered port is the 
server.  While this works reasonably well for connections to servers on 
the well known ports, it's not going to be particularly accurate for 
connections to servers on the unrestricted higher ports.  Of course, 
since news servers normally listen on port 119/nntp, that shouldn't be 
particularly troubling for our uses here.

I figured some pan users might find this app of interest.  If you do, 
check and see if your distribution carries it! (Gentoo does, which is how 
I discovered it while doing tab completion on a tcptr<tab>(aceroute) 
reinstall, noted the tcptrack name as a completion option, and decided to 
investigate.)  Alternatively or for more info, here's its homepage, 
complete with a screenshot: http://www.rhythm.cx/~steve/devel/tcptrack/

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]