Sep 27

Trim down load in server without killing your current running process.

It’s a fact that while we initiate some cpu or memory consumable process or job, the load in server goes high and sometimes the server become unresponsive. But what if the situation is same everytime especially in case of shared servers. The processess like pkgacct, copying, moving high sized files/folders can’t be ignored at the event of migration or other instances etc. Suppose if we initiate a pkgacct of one account and certainly the load goes high in server, so we may need to cut the pkgacct process we initiated for reducing the load. We can’t always do this whenever server load goes high, because it must be a real headache to initiate, cut, reinitiate etc process manually whenever the load varies in server.

You can do this task with the help of cpuwatch in cPanel servers. Just do the following.

=====
/usr/local/cpanel/bin/cpuwatch 3 /scripts/pkgacct cPanelusername
=====

In the above, whenever the load goes high over 3, the process “/scripts/pkgacct cPanelusername” pauses automatically and resumes as well when the load reduce under 3.

Leave a Reply

Your email address will not be published.