
复制#!/bin/bash while : do 善用
vmr=`vmstat | tail -1 | awk {print $1}` if [ ${vmr} -gt 4 ] then date >> /root/monitor.txt vmstat >> /root/monitor.txt netstat -anp >> /root/monitor.txt ps -aux>> /root/monitor.txt last >> /root/monitor.txt tail -10 /var/log/messages >> /root/monitor.txt fi sleep 60 done 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.
(责任编辑:IT科技)