shell监控CPU的脚本

回复 收藏
请问哪位大神帮我写一个监控CPU脚本
2016-06-17 11:11 举报
已邀请:
0

xzzlamp

赞同来自:

#! /bin/bash

##Writen by aming##

l=`uptime |awk -F 'average:' '{print $2}'|cut -d',' -f1|sed 's/ //g' |cut -d. -f1`
load=$[$l+1]
if [ $load -gt 15 ] && [ $send -eq "1" ]
then
    echo "`date +%T` load is $load" >../log/load.tmp
    /bin/bash ../mail/http://file:///C:%5C%5CUsers%5 ... B.pngmail.sh $addr\_load $load ../log/load.tmp
fi
echo "`date +%T` load is $load"


0

zhangyanlong

赞同来自:

你这不对啊。执行报错啊

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: