Slowly and surely, I am scratching the itches I’ve had for a while with regards to data extraction from a running system. One of the big issues I deal with all the time is to extract what the state and components (and their states) of a linux network bond. Its an annoying combination of /sys/class/net, /proc/net/bonding/, and ethtool/ip commands. So I decided to simplify it.
bond0: mac 00:11:22:33:44:55 state up mode load balancing (xor) xmit_hash layer2+3 (2) polling 100 ms up_delay 200 ms down_delay 200 ms ipv4 10.20.30.40/16 ipv6 fe80::123:00ff:fe80:4455/64 eth2: mac 00:11:22:33:44:55, link 1, state up, speed 10000, driver ixgbe eth3: mac 00:11:22:33:44:56, link 0, state down, speed 65535, driver ixgbe eth4: mac 00:11:22:33:44:57, link 1, state up, speed 10000, driver ixgbe eth5: mac 00:11:22:33:44:58, link 0, state down, speed 65535, driver ixgbe
Eventually, I’ll provide csv and json output modules. But this is the first of many. Look at/grab the source on github.
Viewed 36337 times by 3043 viewers