Saturday, May 31, 2014

How to control server load in WHM / Cpanel server while creating or restoring Cpanel backup

When ever we create Cpanel backup or restore cpanel backup It is obvious that server load will increase to control the server load in such situation WHM / Cpanel provides a functionality called cpuwatch, You simply need to attach the cpuwatch with a particular process and when the server load will reach the limit mentioned in cpuwatch it will pause the process and once the server load will come down from that value it will resume that process again.

Below is an example of cpuwatch
  • /usr/local/cpanel/bin/cpuwatch 4 /scripts/pkgacct ronakyad
ronakyad is the user-name of cpanel account, Whenever the load goes high over 4, The process “ scripts/pkgacct ronakyad ” is pauses and as soon as load is less the 4 the process of creating backup is resumed.

you can use it for other operations too like with rsync or any other command, below are some examples.
  • /usr/local/cpanel/bin/cpuwatch 4 du -sch filename

No comments:

Post a Comment

Do Write about the Blog and Welcome to the world where open source is every thing :-)