Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-31-2009, 07:04 AM   #1
LQ Newbie
Registered: May 2007
Posts: 27

Rep: Reputation: 15
Coun Packets sent

hi Guys,

I have a simple question, How can we count packets towards the following IP from my server.

netstat -a | grep 100.400.120.140

app.3528 50376 0 50400 0 ESTABLISHED
app.53184 49800 0 50400 0 ESTABLISHED
I wonder if we can count packets sent and received towards the above mentioned node.

Also ifconfig -a output is as:

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet netmask ff000000
inet netmask ffffff80 broadcast
groupname mrbtipmp
ether 0:3:ba:84:f1:31
eri0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet netmask ffffff80 broadcast
groupname mrbtipmp
ether 0:3:ba:7b:10:84
inet netmask ffffff80 broadcast
Old 01-31-2009, 12:14 PM   #2
Registered: Jan 2009
Posts: 165

Rep: Reputation: 44
I don't have a very specific answer for you, but I think that the only way you can count packets to a specific address is with wireshark (it's a network traffic sniffer).
Old 01-31-2009, 07:45 PM   #3
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
If you are happy playing around with iptables rulesets, you could count with it (although there are a number of situations in which this idea might not be a particularly good one; eg, you have no experience with iptables, you don't have an existing firewall, except set up via a gui tool that doesn't do this, its a production server that you daren't mess around with, etc, etc).
Old 02-01-2009, 11:44 AM   #4
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Originally Posted by Asteroid
I have a simple question, How can we count packets towards the following IP from my server.
# tcpdump host 100.400.120.140

Upon termination (Ctrl+C), tcpdump will show the number of packets captured. If you need these tracked over a long period of time, you should probably point the output to a dump file. See the tcpdump(8) manpages.


P.S. 100.400 is not even a real network...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IV packets kyd Linux - Networking 1 07-30-2005 12:21 PM
packets sent VS packets received fsasya Linux - Networking 0 07-18-2004 07:11 PM
encapsulating TCP packets in UDP packets... yoshi95 Programming 3 06-03-2004 02:53 PM
anybody know what these packets are ? Linux - Security 3 03-25-2003 03:17 AM
packets per second ixion Linux - Networking 1 01-28-2003 06:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration