最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

shell腳本實(shí)現(xiàn)磁盤監(jiān)控系統(tǒng)

 更新時(shí)間:2020年09月27日 08:38:55   作者:高宏宇  
這篇文章主要介紹了shell腳本實(shí)現(xiàn)磁盤監(jiān)控系統(tǒng),幫助大家更好的利用shell腳本管理數(shù)據(jù),感興趣的朋友可以了解下

利用shell腳本實(shí)現(xiàn)每隔60秒磁盤內(nèi)存數(shù)據(jù)監(jiān)控

#!/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 "-----磁盤監(jiān)控系統(tǒng)-----"
  echo "--作者:Mr_GaoHongYu--"
  echo -n "監(jiān)控本機(jī)IP地址:"$xtip
  echo -e '\n'
  echo "-----磁盤使用情況-----"
  echo -n "系統(tǒng)磁盤總?cè)萘浚?$cprl
  echo -e '\n'
  echo -n "當(dāng)前磁盤可用容量:"$cpky
  echo -e '\n'
  echo -n "可用容量百分比:"$cpbfb
  echo -e '\n'
  echo "-----內(nèi)存使用情況-----"
  echo -n "內(nèi)存總?cè)萘浚?$ncrl
  echo -e '\n'
  echo -n "內(nèi)存已使用:"$ncsy
  echo -e '\n'
  echo -n "內(nèi)存已用百分比:"
  echo "$BC%"
    sleep 60
  let i++
done

效果如圖:

以上就是shell腳本實(shí)現(xiàn)磁盤監(jiān)控系統(tǒng)的詳細(xì)內(nèi)容,更多關(guān)于shell 磁盤監(jiān)控的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評(píng)論

南宁市| 铜鼓县| 唐河县| 鱼台县| 义乌市| 上犹县| 云梦县| 双桥区| 本溪| 无极县| 嵊州市| 盐津县| 琼结县| 息烽县| 仙游县| 宜城市| 汶川县| 通道| 广南县| 美姑县| 古田县| 唐山市| 凯里市| 福建省| 江川县| 太和县| 万全县| 汨罗市| 宁陕县| 绥化市| 黎川县| 阜新| 定州市| 富裕县| 宁阳县| 郸城县| 剑河县| 福贡县| 屏南县| 扶余县| 洪洞县|