Sponsored Content
Top Forums UNIX for Advanced & Expert Users Amount of Network Traffic info from netstat output Post 302594637 by wilsonee on Tuesday 31st of January 2012 11:00:36 PM
Old 02-01-2012
Amount of Network Traffic info from netstat output

Hi,

I'm trying to figure out how much traffic has been generated and received from netstat -s output (using Linux). I can see the output shows packet counts and Octet values, how would I correctly calculate how much traffic in and how much out?
My output below:

Ip:
88847576 total packets received
2 with invalid addresses
0 forwarded
0 incoming packets discarded
88847574 incoming packets delivered
52844660 requests sent out
Icmp:
61 ICMP messages received
0 input ICMP message failed.
ICMP input histogram:
destination unreachable: 18
echo requests: 41
echo replies: 2
1183 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 1132
echo request: 10
echo replies: 41
IcmpMsg:
InType0: 2
InType3: 18
InType8: 41
OutType0: 41
OutType3: 1132
OutType8: 10
Tcp:
251019 active connections openings
35110 passive connection openings
1118 failed connection attempts
23126 connection resets received
28 connections established
87528846 segments received
51931529 segments send out
2970 segments retransmited
0 bad segments received.
27487 resets sent
Udp:
1063578 packets received
1135 packets to unknown port received.
0 packet receive errors
1067360 packets sent
UdpLite:
TcpExt:
36 packets pruned from receive queue because of socket buffer overrun
137140 TCP sockets finished time wait in fast timer
703868 delayed acks sent
498 delayed acks further delayed because of locked socket
Quick ack mode was activated 110169 times
12738250 packets directly queued to recvmsg prequeue.
448039148 packets directly received from backlog
6267072197 packets directly received from prequeue
53978991 packets header predicted
15337583 packets header predicted and directly queued to user
3014704 acknowledgments not containing data received
14371452 predicted acknowledgments
469 times recovered from packet loss due to fast retransmit
Detected reordering 1 times using FACK
Detected reordering 1 times using reno fast retransmit
Detected reordering 75 times using time stamp
211 congestion windows fully recovered
639 congestion windows partially recovered using Hoe heuristic
513 congestion windows recovered after partial ack
0 TCP data loss events
20 timeouts after reno fast retransmit
5 timeouts in loss state
506 fast retransmits
169 retransmits in slow start
2065 other TCP timeouts
TCPRenoRecoveryFail: 118
2840 packets collapsed in receive queue due to low socket buffer
1298 DSACKs sent for old packets
3157 connections reset due to unexpected data
13952 connections reset due to early user close
77 connections aborted due to timeout
TCPSackShiftFallback: 32
IpExt:
InMcastPkts: 70545
OutMcastPkts: 2100
InBcastPkts: 342646
InOctets: 98734962532
OutOctets: 14102355880
InMcastOctets: 2257440
OutMcastOctets: 337050
InBcastOctets: 45015868

thanks in advance.

Wilson.

Last edited by wilsonee; 02-01-2012 at 12:01 AM.. Reason: more info
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

monitoring network traffic

there are commands to monitor the memory, paging, io... how about network traffic. i mean commands to see whether the network traffic (LAN) is congested? the closest i got is netstat thanks (6 Replies)
Discussion started by: yls177
6 Replies

2. Cybersecurity

How to capture network traffic

Hi, Can someone give me the clue on how to capture network traffic at gateway. Thanx (2 Replies)
Discussion started by: kayode
2 Replies

3. Infrastructure Monitoring

Network Traffic

Hi all, Got a strange one here, well not so much strange, different :-) I need to work out if a server is particulary chatty, whether its talking / communicating heavily to a particular server, as Im planning to physically move the server to a different server, over a link. Hence the... (6 Replies)
Discussion started by: sbk1972
6 Replies

4. Solaris

'netstat' info on Solaris

Hello All I just wanted to know if on solaris ,below two commands need to be run separately unlike AIX where "/usr/bin/netstat -an -f inet " gives tcp as well as udp info. /usr/bin/netstat -an -f inet -P tcp /usr/bin/netstat -an -f inet -P udp Also is there any way i can make these two... (10 Replies)
Discussion started by: ak835
10 Replies

5. HP-UX

Monitoring traffic in the network

I Colleagues, Somebody can say me how to monitoring traffic in the network. also I am interested in monitoring memory. if somebody to know a guide with command advanced in unix welcome for me. Thank you for adcanced. (0 Replies)
Discussion started by: systemoper
0 Replies

6. Infrastructure Monitoring

How do I know what traffic is in network port?

If I would like to know what connection , data , traffic in a network port ( eth0 ) , what can I do ? ps. because I always found the network is very slow , so I would like what the network port is doing . Thanks Login ID ust3 is currently in read-only mode for multiple infractions. Creating... (0 Replies)
Discussion started by: ust03
0 Replies

7. UNIX for Advanced & Expert Users

How to throttle network traffic?

Hi All I am resilience testing an application that is spread across multiple servers. One thing I will need to do soon is throttle the network traffic for specific interfaces within the test cluster. Specifically, maybe make a connection take twice or three times as long to respond.... I... (3 Replies)
Discussion started by: bbq
3 Replies

8. Shell Programming and Scripting

Help with netstat traffic server command

Help required for creating a unix shell script using netstat command for retrieving total traffic in Kbytes with the source and destination address. (4 Replies)
Discussion started by: Samee
4 Replies

9. IP Networking

I would like to monitor network traffic for a computer on my network

My son does homework on a school laptop. I was thinking about setting up a gateway on my home network, so that I can monitor web traffic and know if he is doing his homework without standing over his shoulder. Ideally I would like to use the Raspberry Pi Model b that I already have. However, I... (15 Replies)
Discussion started by: gandolf989
15 Replies
PPPSTATS(8)						      System Manager's Manual						       PPPSTATS(8)

NAME
pppstats - print PPP statistics SYNOPSIS
pppstats [ -a ] [ -v ] [ -r ] [ -z ] [ -c <count> ] [ -w <secs> ] [ interface ] DESCRIPTION
The pppstats utility reports PPP-related statistics at regular intervals for the specified PPP interface. If the interface is unspecified, it will default to ppp0. The display is split horizontally into input and output sections containing columns of statistics describing the properties and volume of packets received and transmitted by the interface. The options are as follows: -a Display absolute values rather than deltas. With this option, all reports show statistics for the time since the link was initi- ated. Without this option, the second and subsequent reports show statistics for the time since the last report. -c count Repeat the display count times. If this option is not specified, the default repeat count is 1 if the -w option is not specified, otherwise infinity. -r Display additional statistics summarizing the compression ratio achieved by the packet compression algorithm in use. -v Display additional statistics relating to the performance of the Van Jacobson TCP header compression algorithm. -w wait Pause wait seconds between each display. If this option is not specified, the default interval is 5 seconds. -z Instead of the standard display, show statistics indicating the performance of the packet compression algorithm in use. The following fields are printed on the input side when the -z option is not used: IN The total number of bytes received by this interface. PACK The total number of packets received by this interface. VJCOMP The number of header-compressed TCP packets received by this interface. VJUNC The number of header-uncompressed TCP packets received by this interface. Not reported when the -r option is specified. VJERR The number of corrupted or bogus header-compressed TCP packets received by this interface. Not reported when the -r option is spec- ified. VJTOSS The number of VJ header-compressed TCP packets dropped on reception by this interface because of preceding errors. Only reported when the -v option is specified. NON-VJ The total number of non-TCP packets received by this interface. Only reported when the -v option is specified. RATIO The compression ratio achieved for received packets by the packet compression scheme in use, defined as the uncompressed size divided by the compressed size. Only reported when the -r option is specified. UBYTE The total number of bytes received, after decompression of compressed packets. Only reported when the -r option is specified. The following fields are printed on the output side: OUT The total number of bytes transmitted from this interface. PACK The total number of packets transmitted from this interface. VJCOMP The number of TCP packets transmitted from this interface with VJ-compressed TCP headers. VJUNC The number of TCP packets transmitted from this interface with VJ-uncompressed TCP headers. Not reported when the -r option is specified. NON-VJ The total number of non-TCP packets transmitted from this interface. Not reported when the -r option is specified. VJSRCH The number of searches for the cached header entry for a VJ header compressed TCP packet. Only reported when the -v option is spec- ified. VJMISS The number of failed searches for the cached header entry for a VJ header compressed TCP packet. Only reported when the -v option is specified. RATIO The compression ratio achieved for transmitted packets by the packet compression scheme in use, defined as the size before compres- sion divided by the compressed size. Only reported when the -r option is specified. UBYTE The total number of bytes to be transmitted, before packet compression is applied. Only reported when the -r option is specified. When the -z option is specified, instead displays the following fields, relating to the packet compression algorithm currently in use. If packet compression is not in use, these fields will all display zeroes. The fields displayed on the input side are: COMPRESSED BYTE The number of bytes of compressed packets received. COMPRESSED PACK The number of compressed packets received. INCOMPRESSIBLE BYTE The number of bytes of incompressible packets (that is, those which were transmitted in uncompressed form) received. INCOMPRESSIBLE PACK The number of incompressible packets received. COMP RATIO The recent compression ratio for incoming packets, defined as the uncompressed size divided by the compressed size (including both compressible and incompressible packets). The fields displayed on the output side are: COMPRESSED BYTE The number of bytes of compressed packets transmitted. COMPRESSED PACK The number of compressed packets transmitted. INCOMPRESSIBLE BYTE The number of bytes of incompressible packets transmitted (that is, those which were transmitted in uncompressed form). INCOMPRESSIBLE PACK The number of incompressible packets transmitted. COMP RATIO The recent compression ratio for outgoing packets. SEE ALSO
pppd(8) 26 June 1995 PPPSTATS(8)
All times are GMT -4. The time now is 09:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy