With 1.7 million freelancers, we'll match you with the perfect talent.
The client has made the following changes to the job.
Client prefers freelancers from:
You are still able to submit a proposal for this job.
The client prefers freelancers from
a different location.
Create a script that monitors any process, for example mysqld, for CPU usage above n% and memory usage above a n%. If the mysqld(for example) maintains the high n% for 5 attempts or high memory n%, based on number of minutes between attemtps, then restart the mysqld process. The script should have 4 variables that can be modified at the command line for cpu%(the level of cpu usage), memory%(level of system memory), attempts(number of attempts to check before restarting) and minutes(minutes between each attempt).
check_process cpu% mem% attempts minutes_between_attempts
check_process 90% 25% 5 8
This script should be designed to run as root with a cron job to restart the mysqld, or other process, when it maintains these states for a specified period of time. It should be designed to restart if it meets either the cpu or mem limits for the specified time limits.
Added 10 AUG 2012, 12:51 PM EDT
This will need to be a Bash shell script.
Sign in or Register to see more