| 发表于:2007-02-27 15:46:022楼 得分:0 |
把你的命令写到一个shell脚本中: #!/bin/sh sar -u 2 30 > > total_info.txt iostat -t -c 2 30 > > cpu_info.txt vmstat -s k 2 30 > > memory_info.txt iostat -d 2 30 > > decive_io_info.txt 假设shell脚本名称为monitorall.sh 修改你的crontab,增加一行: 5 * * * * /home/yourhome/monitorall.sh 这样每5分钟该脚本就会自动执行一次。 | | |
|