[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] perl nice'ness
- Subject: [ale] perl nice'ness
- From: fletch at phydeaux.org (fletch at phydeaux.org)
- Date: Mon Oct 8 12:35:16 2007
- In-reply-to: <1191738866.800.1.camel@localhost>
- References: <1191734659.26032.4.camel@localhost> <[email protected]> <1191738866.800.1.camel@localhost>
> On Sun, 2007-10-07 at 01:48 -0400, List wrote:
>> Jim Popovitch wrote:
>> > Is there a way to make perl scripts run nicer wrt to cpu utilization,
>> > rather than at the default 0 nice?
>> >
>> > Thx,
>> >
>> > -Jim P.
>> >
>> nice -19 perl <args>
>>
>> or, if the script is already running,
>>
>> renice 19 <process-id-of-perl>
>>
>> ought to fix you up.
>
> Well, I already know that... what I'm looking for is a way to
> force /usr/bin/blah.pl to always be nice 10 regardless of who runs it.
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw( nice );
## yadda yadda yadda
nice( 10 ) or warn "Can't nice( 10 ) myself: $!\n";
## rest of your program here . . .
exit 0;
__END__
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org| Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U