Home > Oracle in general > Solaris Live Network Bandwidth Monitoring

Solaris Live Network Bandwidth Monitoring

When doing performance analysis the current network throughput is often interesting. The following nice script display that – even without any root permissions.

 # usage: netvolmon DEV [INTERVAL]
getrxtx() {
 kstat -p "*:*:$1:*bytes64" |
 awk '{print $2}'
rxtx=`getrxtx $DEV`
 while sleep $IVAL; do
 nrxtx=`getrxtx $DEV`
 (echo $IVAL $rxtx $nrxtx) |
 awk 'BEGIN {
 msg = "%6.2f MB/s RX %6.2f MB/s TX\n"}
 {rxd = ($4 - $2) / (1024*1024*$1);
 txd = ($5 - $3) / (1024*1024*$1);
 printf msg, rxd, txd}'

The script is taken from here: http://utcc.utoronto.ca/~cks/space/blog/solaris/SolarisNetworkBandwidth

It produces the following output which is sufficient to get a quick overview about the current network traffic:

bash-3.2$ /export/home/oracle/net.sh igb0 5
  0.59 MB/s RX  20.54 MB/s TX
  1.17 MB/s RX  40.81 MB/s TX
  1.71 MB/s RX  59.72 MB/s TX
Categories: Oracle in general Tags:
  1. No comments yet.
  1. No trackbacks yet.