snmp+mrtg

#!/bin/bash
2 hd=sda
3 disk=/dev/$hd
4 UPtime=`/usr/bin/uptime |awk '{print $3""$4""$5}'`
5 KBread_sec=`iostat -x $disk|grep $hd |awk '{print $8}'`
6 KBwrite_sec=`iostat -x $disk|grep $hd |awk '{print $9}'`
7 echo $KBread_sec
8 echo $KBwrite_sec
9 echo $UPtime
10 hostname

posted @ 2014-01-10 16:43  jlt  阅读(83)  评论(0编辑  收藏  举报