ramblings of an IT professional
CPUwatch
Hello everyone!
This is just a quick post because it came to my attention today that many do not know about the cpuwatch command included within cPanel to assist with running commands that cause intense server load. The use is as follows:
/usr/local/cpanel/bin/cpuwatch LOADAVG COMMAND
As an example would be:
/usr/local/cpanel/bin/cpuwatch 8 cp -r /home/username/public_html/* /home2/username/public_html/
This would run the cp command but ensure that the load does not rise above 8. If it did, the command would pause until the load decreased then start again. I highly suggest using this in all situations where load averages are varying and complex commands are being run during prime time.
Let me know if you have any questions on this in the comments.
| Print article | This entry was posted by dennis on June 8, 2009 at 4:01 pm, and is filed under cPanel, Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 1 year ago
This has got to be the 10th time I have accidentally wound up on your blog to find the thing I need.
about 6 months ago
I’ve read several sites that talk about cpuwatch where they use the word Pause or throttled.
Does cpuwatch pause the process (stop it completely) or throttle (slow down) the process?
sometimes on my webserver, I have a heavy httpd load and wouldn’t want the egregious process to stop completely, just be throttled down
about 6 months ago
CPUWatch completely pauses processes until the load decreases, so its not ideal for services like httpd which would completely drop off the map if they were effectively “paused”. It’s moreso handy for cron style processes which need to be ran at intervals such as backups or other sundry tasks.
Hope this helps and thanks for reading Victor!