神剑山庄资源网 Design By www.hcban.com
利用shell脚本实现每隔60秒磁盘内存数据监控
#!/bin/bash #Author:GaoHongYu #QQ:1061767621 #Time:2019-12-24 18:43:22 #Name:ncjk.sh #Version:V1.0 clear xtip=$(hostname -I) cprl=$(df -Th |head -2|tail -1|cut -d " " -f 10) cpky=$(df -Th |head -2|tail -1|cut -d " " -f 12) cpbfb=$(df -Th |head -2|tail -1|cut -d " " -f 18) ncrl=$(free -m |head -2|tail -1|cut -d " " -f 13) ncsy=$(free -m |head -2|tail -1|cut -d " " -f 22)BC=$(echo "scale=2;$ncsy/$ncrl*100" |bc|cut -d "." -f 1) i=1 while [ $i -le 60 ];do echo -e '\n' echo -e '\n' echo "-----磁盘监控系统-----" echo "--作者:Mr_GaoHongYu--" echo -n "监控本机IP地址:"$xtip echo -e '\n' echo "-----磁盘使用情况-----" echo -n "系统磁盘总容量:"$cprl echo -e '\n' echo -n "当前磁盘可用容量:"$cpky echo -e '\n' echo -n "可用容量百分比:"$cpbfb echo -e '\n' echo "-----内存使用情况-----" echo -n "内存总容量:"$ncrl echo -e '\n' echo -n "内存已使用:"$ncsy echo -e '\n' echo -n "内存已用百分比:" echo "$BC%" sleep 60 let i++ done
效果如图:
以上就是shell脚本实现磁盘监控系统的详细内容,更多关于shell 磁盘监控的资料请关注其它相关文章!
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无shell脚本实现磁盘监控系统的评论...
更新日志
2024年10月04日
2024年10月04日
- 纪钧瀚《钢琴阅读时光 雨中书店聆听轻音乐》[320K/MP3][203.44MB]
- 群星.1981-名曲65(2014环球复黑王·百代篇)【EMI百代】【WAV+CUE】
- 陈淑桦.1990-娃娃的故事【柯达】【WAV+CUE】
- 戴梅君.2011-问签诗【美华】【WAV+CUE】
- 戴梅君.2011-问签诗【美华】【WAV+CUE】
- 李国祥.1995-九五变奏【嘉音】【WAV+CUE】
- 许景淳.1992-你来自何方【全美唱片】【WAV+CUE】
- 石欣卉.2007-剧欣卉集·完整电视剧主题精丫华纳】【WAV+CUE】
- 群星.2005-LOVE情歌集VOL.5.2CD【正东】【WAV+CUE】
- 孙悦.1996-伙伴【正大国际】【WAV+CUE】
- 纪钧瀚《钢琴阅读时光 雨中书店聆听轻音乐》[FLAC/分轨][399.62MB]
- 证声音乐图书馆《走向自然 疗心爵士乐》[320K/MP3][87.4MB]
- 证声音乐图书馆《走向自然 疗心爵士乐》[FLAC/分轨][184.94MB]
- 陈慧娴.2018-Priscilla-Ism演唱会3CD(2024环球红馆40复刻系列)【环球】【WAV+CUE】
- 郑秀文.1999-我应该得到(国)【华纳】【WAV+CUE】