首页 > 代码库 > nagios 监控xenserver 流量
nagios 监控xenserver 流量
cat check_xen_pif.sh #!/bin/sh count=0 uuid_list=`xe bond-list | grep master | awk ‘{print $4}‘` #get io_read_kbs param for uuid in $uuid_list do io_read[$count]=`xe pif-param-get param-name=io_read_kbs uuid=$uuid` # echo ${io_read[$count]} let count=count+1 done #get io_write_kbs param count=0 for uuid in $uuid_list do io_write[$count]=`xe pif-param-get param-name=io_write_kbs uuid=$uuid` # echo ${io_write[$count]} let count=count+1 done count=0 performance1="" performance2="" while [ $count -lt ${#io_read[@]} ] do performance1="$performance1 bond${count}(r,w): ${io_read[$count]}kb,${io_write[$count]}kb;" performance2="$performance2 bond${count}_io_read_kbs=${io_read[$count]};1500;2000;0;10000;bond${count}_io_write_kbs=${io_write[$count]};1500;2000;0;10000;" let count=count+1 done echo "$performance1 | $performance2" exit 0
本文出自 “月童” 博客,谢绝转载!
nagios 监控xenserver 流量
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。