[PowerShell] Linux下系统状态监控脚本 →→→→→进入此内容的聊天室

来自 , 2020-05-06, 写在 PowerShell, 查看 104 次.
URL http://www.code666.cn/view/1f50d073
  1. #!/bin/sh
  2.  
  3. #systemstat.sh
  4.  
  5. #Mike.Xu
  6.  
  7. IP=192.168.1.227
  8.  
  9. top -n 2| grep “Cpu” >>./temp/cpu.txt
  10.  
  11. free -m | grep “Mem” >> ./temp/mem.txt
  12.  
  13. df -k | grep “sda1″ >> ./temp/drive_sda1.txt
  14.  
  15. #df -k | grep sda2 >> ./temp/drive_sda2.txt
  16.  
  17. df -k | grep “/mnt/storage_0″ >> ./temp/mnt_storage_0.txt
  18.  
  19. df -k | grep “/mnt/storage_pic” >> ./temp/mnt_storage_pic.txt
  20.  
  21. time=`date +%m”.”%d” “%k”:”%M`
  22.  
  23. connect=`netstat -na | grep “219.238.148.30:80| wc -l`
  24.  
  25. echo$time  $connect>> ./temp/connect_count.txt
  26. //shell/5371

回复 "Linux下系统状态监控脚本"

这儿你可以回复上面这条便签

captcha