Linux – What builds /proc/net/bonding

bondinglinuxlinux-networking

We're monitoring the network interfaces with Nagios/check_mk, which looks at /proc/net/bonding/bond0 to see the status of the interfaces. Unfortunately, we had an improper config and 2 NICs were in there but showing down (rightfully so since they're not connected). I removed the NICs from the bond and restarted services, but that doesn't refresh the file /proc/net/bonding/bond0. I'd like to update the system without rebooting it, is it possible to run a command to get this file updated?

Best Answer

I was able to get the system to clean up the file /proc/net/bonding/bond0 without rebooting. You will drop some packets, but if you're ssh'ed in and put everything on a single line, we were able to get it to work fairly with minimal downtime and the customer not complaining

make changes to your ifcfg/bond files, then run:

ifdown bond0 && rmmod bonding && modprobe bonding && ifup bond0

If your configurations are right, you'll be back in business and /proc/net/bonding/bond0 will be rewritten with the correct information. If the configs are wrong, you just lost access to the server.