Skip to content

Commit 2c36150

Browse files
authored
Merge pull request #48 from lsst-it/IT-6667/monit_netspeed
(files/monit_netspeed) handle bonds
2 parents 15dc01d + 7908cc0 commit 2c36150

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

files/monit_netspeed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ eth0=$(nmcli -g ip4.address,general.device dev show 2> /dev/null | \
2424
ip -br link show type bridge | grep -q "^$eth0 " && \
2525
eth0=$(ip -br link show master "$eth0" | grep -v ^v | cut -f1 -d' ')
2626

27+
## Eg lsstcam-dc1: go from "bond0.1511@bond0" to "bond0.1511".
28+
eth0=${eth0%@bond*}
29+
2730
speed=$(ethtool "$eth0" 2> /dev/null | sed -n 's/.*Speed: *\([0-9]*\).*/\1/p')
2831

2932
case $speed in

0 commit comments

Comments
 (0)