Re: lower cpu priority to perl scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux