复制代码 代码如下:
#!/bin/bash
# March-13-2006
# CPUuse trigger script by Noel
#
# bash code to watch a running program's CPU usage.
# if it's above a set value, it will auto send an email.
# You will need to set a Cron job to run this script every xx minutes
#
# Set some needed things:
#
processToWatch="convert" # in my case I need to watch convert
emailAddress="root@host" # this is my main emailaddress
triggerValue=90 # if the CPU use is above 90% send an email. DO NOT USE a DOT or COMMA!
tempFileName=tmp-cpu # some name of the temp file for the ps, grep data
ps auxww | grep "$processToWatch" | grep -v grep > /tmp/$tempFileName
export LINE
(
read LINE
while [ -n "$LINE" ]
do
set $LINE
read LINE
if [ $(echo "$3" | sed -e 's/\.[0-9]*//g') -gt $triggerValue ]; then
mail -s "CPU message alert for: $processToWatch" $emailAddress <<-END
This is to inform you that the following process: $processToWatch with PID (Process ID) $2 is now using more than your preset $triggerValue value.
Process: $processToWatch is using: $3 of CPU power!
The command used is: $11
END
fi
done
)< /tmp/$tempFileName
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
- 《蛋仔派对》发条鹦鹉巴洛皮肤图鉴
- 沈文程1988-畅销曲精华[爱莉亚][WAV+CUE]
- Brahms-ViolinConcerto,C.Schumann-3Romances-Batiashvili(2013)[96-24]
- Tchaikovsky-SymphonyNo.6-Nezet-Seguin,LisaBatiashvili(2014)[96-24].
- 《鸦卫奇旅》自定义是不是解锁不了难度
- 《海贼王赏金猎人》配置要求一览
- 《狗钩宇宙狗狗》联机失败解决方法
- 两款《宝可梦》国行版发售!售价299元 还有新外设
- 《塞尔达》新作常规通关20小时 全收集需30小时
- 腾讯Switch开启假日折扣!多款国产游戏迎史低
- 群星.1998-在那一年2CD【宝丽金】【WAV+CUE】
- 黄征.2012-征爱·拾力【乐华娱乐】【FLAC分轨】
- 凤飞飞.1998-凤飞飞30周年飞精选CD书2CD【歌林】【WAV+CUE】
- 《发烧大牌榜 精雕细琢的珍品 10CD》[WAV/分轨][5.1GB]
- 《张学友 最经典发烧金典》[WAV/分轨][600MB]