Re: Packet Counting...

Linux Advanced Routing and Traffic Control

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

 





On 16 Mar 2005 at 9:46, M. A. Imam wrote:

How can i count the number of packets on an interface evry 2 or 5
seconds. and i want to count only specific packets like only arriving
packets from port 5001

Any thoughts...

I'm wondering what your usage needs are. 1) Do you just neeed a quick view of what is going on, 2) or do your need some stable permanent statistics collector?

If the case is 1) the quick view, I will recommend the tool: "tcpstat"
 http://www.frenchfries.net/paul/tcpstat/

tcpstat supports tcpdump style filters (berkley packet filter) thus you should run the following command:

 tcpstat -i eth1 -f 'port 5001' 5

The number 5 at the end gives you stats every 5 sec.

Greatings
  Jesper Brouer

--
-------------------------------------------------------------------
Research Assistant
Dept. of Computer Science, University of Copenhagen
E-mail: hawk@xxxxxxx, Direct Tel.: 353 21438
-------------------------------------------------------------------
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux