早期freebsd实现

源代码在线查看: innwatch.ctl

软件大小: 40554 K
上传用户: luyibo54618
关键词: freebsd
下载地址: 免注册下载 普通下载 VIP

相关代码

				##  $Revision: 1.3 $				##  innwatch.ctl -- control file for innwatch.				##  Indicates what to run to test the state of the news system, and what				##  to do about it.  Format:				##	!state!when!command!test!limit!command!reason/comment				##  where				##			Delimiter; pick from [,:@;?!]				##			State to enter if true.				##			States we must be in to match.				##		Command to run to test condition.				##			Operator to use in test(1) command.				##			Value to test against.				##		Command for innwatch to perform; use exit,				##			flush, go, pause, shutdown, skip, or throttle.				##		Used in ctlinnd command (if needed).								##  First, just exit innwatch if innd has gone away.				##  =()@ && echo 0 || echo 1 ! eq ! 1 ! exit ! innd dead>()=				!!! test -f /var/spool/news/data/innd/innd.pid && echo 0 || echo 1 ! eq ! 1 ! exit ! innd dead								##  Next test the load average.  Above first threshold pause, above higher				##  threshold throttle, below restart limit undo whatever was done.				##  =()@ ! go ! loadav>()=				!load!load hiload! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! lt ! 1000 ! go ! loadav				##  =()@ ! throttle ! loadav>()=				!hiload!+ load! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! 2000 ! throttle ! loadav				##  =()@ ! pause ! loadav>()=				!load!+! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! 1500 ! pause ! loadav								##  If load is OK, check space (and inodes) on various filesystems				##  =()@ ! throttle ! No space (spool)>()=				!!! df . | awk 'NR == 2 { print $4 }' ! lt ! 8000 ! throttle ! No space (spool)				##  =()@ | awk 'NR == 2 { print $4 }' ! lt ! @@ ! throttle ! No space (newsq)>()=				!!! df /var/spool/news/out.going | awk 'NR == 2 { print $4 }' ! lt ! 800 ! throttle ! No space (newsq)				##  =()@ | awk 'NR == 2 { print $4 }' ! lt ! @@ ! throttle ! No space (newslib)>()=				!!! df /var/spool/news/data | awk 'NR == 2 { print $4 }' ! lt ! 25000 ! throttle ! No space (newslib)				##  =()@ ! throttle ! No space (spool inodes)>()=				!!! df -i . | awk 'NR == 2 { print $3 }' ! lt ! 200 ! throttle ! No space (spool inodes)							

相关资源