ShellScript‎ > ‎

One Liners

Restart Apache if it has spawned more than 250 worker processes. (Check every 30 seconds)

watch -n 30 'if [ `ps -ef | grep apache | wc -l` -ge 250 ]; then /etc/init.d/apache2 restart; fi'
Comments