另外注意一定要把本脚本文件加入到系统启动文件中,即让系统启动后自动运行这个脚本才能启动监控作用,加入方法如下: vi /etc/rc.d/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don''''t # want to do the full Sys V style init stuff.