Thursday, January 8, 2009

How to Monitor traffic between nodes

With the command netstat -i we can monitor the traffic in the network nodes. The sample output of netstat -i is below.
# netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 226707 0 0 0 68280 0 0 0 BMRU
lo 16436 0 13 0 0 0 13 0 0 0 LRU
vmnet 1500 0 0 0 0 0 6 0 0 0 BMRU


We can get the the elaboration of the preceding terms below.
* Name - The type of the Ethernet interface
* Mtu - The maximum size of the packets that are transmitted on the network.
* Net/Dest - The subnet address
* Address - The name of the system
* Ipkts - The number of packets received
* Ierrs - The number of received packets that have errors
* Opkts - The number of packets sent
* Oerrs - The number of sent packets that have errors
* Collis - The number of output packets that result in collision
* Queue - The number of packets that are queued

Considerations on the output

* The Queue field should have a 0 value.
* The Collis field value should not be greater than 5% of the no. of Opkts.
* If Ierrs field value is greater than 25% of the Ipkts field value the system is dropping packets, which causes a high number of input errors.

It is difficult to interpret the output of the netstat utility for a system with many network interfaces. In that case you can use,
$netstat -i eth1(interface name)
to get traffic of a particular interface.

No comments:

Post a Comment