<< June 2010 | Home | August 2010 >>

Simple linux bandwidth monitoring with bwm-ng

Where has this tool been all my life?
Bookmark and Share

These past few days I've been running some load tests on new servers, configurations and our Internet link. While we have a Cacti installation graphing everything via SNMP, the 5 minute polling interval means waiting for what seems like forever.

I just want some quick and clean bandwidth statistics!

After some years of needing a simple tool, finally bwm-ng has entered my life. Where have you been all these years, bwm-ng? I assume that bwm-ng is short for "bandwidth monitor, next generation."

bwm-ng in action

My only complaint is that when monitoring network interfaces, ethernet bonds are treated as equals to the real interfaces rather than the virtual cumulative devices they are.

Other than that, this tool rocks. Some features that are most pleasing:

  • Displays different units: bps to Mbps, Bps to MBps
  • Network interfaces and hard drives
  • Simple, clean and easy to comprehend user interface
  • 100ms polling interval granularity
  • apt-get installation on Debian Lenny

#geekloveatfirstsight

Multiple bonds on Debian Lenny, and related No such device error

SIOCSIFADDR: No such device on Debian Lenny with NIC bonding
Bookmark and Share

While setting up a few Debian Lenny machines this summer, I came across the error message SIOCSIFADDR: No such device a few times. All of these servers have NIC bonding configured, and a few of them have multiple Ethernet bonds. Here are a couple of potential causes for this error message:

  • The /etc/modprobe.d/arch/X86_64 file does not contain the bonded device name. For multiple bonded devices, the file must contain an alias entry for each. Here is an example for a two device system named bond0 and bond1:
    
    alias bond0 bonding
    alias bond1 bonding
    
    
  • The /etc/modules module for bonding (bonding mode=4 miimon=100 max_bonds=2) is configured for fewer bonds than the server has. The here max_bonds=2 is the maximum number of bonding devices your system will have. The default is 1. If you machine has more, then SIOCSIFADDR: No such device will appear for the devices that did not come up.

Adding a hot spare to a P400 controller in an HP DL380 at the command line in linux

Bookmark and Share

Just so I don't forget. Again.

berea:~# hpacucli 
HP Array Configuration Utility CLI 8.28-13.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> ctrl all show

Smart Array P400 in Slot 1                (sn: P61620D9SUK034)

=> ctrl slot=1 show

Smart Array P400 in Slot 1
   Bus Interface: PCI
   Slot: 1
   Serial Number: P61620D9SUK034
   Cache Serial Number: PA82C0H9SUJL94
   RAID 6 (ADG) Status: Disabled
   Controller Status: OK
   Chassis Slot: 
   Hardware Revision: Rev D
   Firmware Version: 7.08
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 15 secs
   Post Prompt Timeout: 0 secs
   Cache Board Present: True
   Cache Status: OK
   Accelerator Ratio: 100% Read / 0% Write
   Drive Write Cache: Disabled
   Total Cache Size: 256 MB
   No-Battery Write Cache: Disabled
   Battery/Capacitor Count: 0
   SATA NCQ Supported: True

=> ctrl slot=1 array all show

Smart Array P400 in Slot 1

   array A (SAS, Unused Space: 0 MB)
   array B (SAS, Unused Space: 0 MB)

=> ctrl slot=1 ld all show

Smart Array P400 in Slot 1

   array A

      logicaldrive 1 (68.3 GB, RAID 1, OK)

   array B

      logicaldrive 2 (136.7 GB, RAID 5, OK)

=> ctrl slot=1 pd all show

Smart Array P400 in Slot 1

   array A

      physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 72 GB, OK)
      physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 72 GB, OK)

   array B

      physicaldrive 1I:1:6 (port 1I:box 1:bay 6, SAS, 72 GB, OK)
      physicaldrive 1I:1:7 (port 1I:box 1:bay 7, SAS, 72 GB, OK)
      physicaldrive 1I:1:8 (port 1I:box 1:bay 8, SAS, 72 GB, OK)

   unassigned

      physicaldrive 2I:1:3 (port 2I:box 1:bay 3, SAS, 73.5 GB, OK)

=> ctrl slot=1 array a add spares=2I:1:3
=> ctrl slot=1 pd all show

Smart Array P400 in Slot 1

   array A

      physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 72 GB, OK)
      physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 72 GB, OK)
      physicaldrive 2I:1:3 (port 2I:box 1:bay 3, SAS, 73.5 GB, OK, spare)

   array B

      physicaldrive 1I:1:6 (port 1I:box 1:bay 6, SAS, 72 GB, OK)
      physicaldrive 1I:1:7 (port 1I:box 1:bay 7, SAS, 72 GB, OK)
      physicaldrive 1I:1:8 (port 1I:box 1:bay 8, SAS, 72 GB, OK)

=> 
=> exit
Tags :