Script for restarting apache at load 10

#!/bin/bash
loadavg=$(uptime | awk -F “.” ‘{ print $1 }’ | awk -F “:” ‘{ print $5 }’)
if [ “$loadavg” -ge “10” ]; then
pkill -9 httpd
sleep 3
/scripts/restartsrv_httpd
fi

2 thoughts on “Script for restarting apache at load 10

Leave a comment