Over a million developers have joined DZone.

Bandwidth Monitoring From The Console Using 'pktstat'

Pktstat, http://www.adaptive-enterprises.com.au/~d/software/pktstat/, displays a real-time summary of packet activity on an interface. Each line displays the data rate associated with a particular class of packets. The class is determined by the packet header.

For example, 'pktstat -w1' will refresh once per second showing the average bandwidth usage and active connections:

# pktstat -w1

  interface: eth0 
  load averages: 285.9k 167.3k 67.3k bps 

    bps    % desc 
  466.8   0% arp 
             tcp <-> c-24-21-74-176:1472 
   6.0k   0% tcp c-24-21-74-176:3933 <-> host75:3724 
  63.5k   1% tcp c-24-21-74-176:4662 <-> p50906304:61951 
  27.4k   0% udp <->

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}