#!/bin/bash

# 检测Bond口slave数量

if [ -d "/sys/class/net/bond0" ]; then
	nums=$(cat /sys/class/net/bond0/bonding/slaves|awk '{print NF}')
else
	exit 0
fi
if [ -n $nums ];then
	echo '[{"value":'$nums',"tags":"iface=bond0"}]'
fi

exit 0
