On 06/20/2010 10:27 AM, Huang, Tao wrote:
On Sun, Jun 20, 2010 at 6:32 PM, Stan Hoeppner<stan@hardwarefreak.com> wrote:Ron Johnson put forth on 6/20/2010 1:58 AM:$ netstat -an | grep ^tcp\ | grep -v LISTEN | wc -l 111You might get a more accurate count of BitTorrent connections with: netstat -an | grep ^tcp\ | grep ":"[6][8,9][0-9][0-9] | grep -c -v LISTEN"netstat -atn" instead of "netstat -an | grep ^tcp\" :p
Nope, since that also returns tcp6 packets. This does it simplest: $ netstat -ant4 -- Seek truth from facts.