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.

3 Replies to “CPUwatch”

  1. 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

  2. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *