httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Audio Phile <da_audioph...@yahoo.com>
Subject Re: [users@httpd] lower cpu priority to perl scripts
Date Thu, 28 Aug 2008 19:17:06 GMT
Thanks to all who replied.  Richard, your solution works great.  I
didn't realize this was a script-specific mod.  I thought there would
be a setting in an apache2.conf or something on the FS.  I'm very glad
to have learned this.  Thanks again!

Richard de Vries wrote: 
If you are running on unix, the easiest way to probably do this is by calling the "setpriority"
from within your perl script like this:
setpriority(WHICH,WHO,PRIORITY);
To set your current running perlscript to the lowest priority, you would call setpriority(0,
$$, 20);
$$ is your script's process ID, and "20" denotes the priority. (as you know, -20 is highest
priority and 20 the lowest priority). 
Cheers,
   R.


      

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message