What is the most common way of monitoring devices belonging to a bond?

Solution Verified - Updated -


What's the best option to properly monitor bonding devices (master & slaves).

Is there a way to generate alert whenever a nic belonging to a status change for any version of Red Hat Enterprise Linux (RHEL) above (and including) RHEL4?

If the format of /proc/net/bonding/bondX is guaranteed to be constant between release, the following bash script should work :

for BONDINTF in $(ls ${PROCDIR}/*)
    for DOWNIF in $(awk -F\: 'BEGIN{x=""};{if ($1 == "MII Status" && $2 !~/up/ && x != "" ) {print x}}; {if ($0 !~/Mode/) {x=$2}}' ${BONDINTF})
      # generate an alert on $BONDIF about $DOWNIF

Is it guaranteed to work on any version of RHEL ?


  • Red Hat Enterprise Linux 4, 5 or 6.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content