Build precise queries to find exactly what you need
Press ESC to close
@BlauwBlaatje
Favorites0
Views
Projects0
As of Linux 3.13 the bonding driver uses /sys/class/net/bond0/lower_eth0/operstate instead of /sys/class/net/bond0/slave_eth0/operstate. Here is a patch (you might brush it up a bit ;)) --- check_linux_bonding.a 2014-04-30 09:22:10.523457651 +0200 +++ check_linux_bonding.b 2014-04-30 09:26:33.975182901 +0200 @@ -255,6 +255,13 @@ my $masters_file = "$sysdir/bonding_masters"; my @bonds = (); my %bonding = (); + my $device; + my ($kernver, @rest) = split('-', `uname -r`); + if ( $kernver >= 3.13 ) { + $device = "lower"; + } else { + $device = "slave"; + } if (! -f $masters_file) { return {}; @@ -311,8 +318,8 @@ # get slave status foreach my $slave (@slaves) { - open my $STATE, '
Reviewed 11 years ago