标签:
自己写的, 方便调试。
$ cat pf-vf
echo "physfn is $1"
echo "pf info:"
ls /sys/class/net/$1 -l
echo "vf info:"
eth_dev=`ls /sys/class/net/$1/device/virtfn* -l | cut -d ">" -f 2 |cut -d "/" -f 2`
for i in $eth_dev; do echo "`ls /sys/bus/pci/devices/$i/net` --> $i"; done
还写了一个脚本:
$ cat vf-pf
echo "vf info:"
ls /sys/class/net/$1 -l
NAME=`ls /sys/class/net/$1/device/physfn/net/`
echo "pf info:"
echo "physfn is $NAME"
ls /sys/class/net/$NAME -l
标签:
原文地址:http://www.cnblogs.com/shaohef/p/5728411.html