program to check cpu load
my server get hanged when ever their is loading problem.
i wanna a program to get cpu load and also when load get high from a specified load value it should restart service. is their is any programm or how to write that programm.. |
you can use
Code:
uptime Take a look at Advanced Bash Scripting Guide how to get this handled in a script to restart your service in case of high load. |
thnx for reply
i dont want command i know this command i need coding to get cpu load.also code to restrict cpu load from exceeding to limit...and if possible to we can also write to kill the current process and restart it.this i want in code.... in short i need script to get cpu load and when load exceed to limit it wil restart the service... |
How much are you willing to pay a consultant to write this script for you?
|
none....
|
Do i understand correct, you are requesting us to provide you with code?
|
You might want to set a limit here http://linux.die.net/man/5/limits.conf
|
|
Quote:
Write your own code, if you want it for free. We will be glad to HELP you, but we're not here to give you handouts, because you don't want to do the work for yourself. |
Quote:
iam not a programmer, just beginner in linux..to learn coding will takes time.so i asked for help regarding issue.if any body have better option then coding then please provide me.... if i get code then definitely i will post it. so dont say i dont want to do work... other also get help from this post. |
Quote:
And yes, coding takes time...so your options are either:
|
Quote:
the guru --i always first google and search.and if i didnot found or i didnot understand the ans then only i post thread... HELP also means to help in searching solution.if you know the script site then beside of writing all this waste you should have mention it.this turn into help..thats help by the way i found the script soon i am going to post the links... |
Quote:
Quote:
|
All times are GMT -5. The time now is 06:18 PM. |