in reply to Re: How to limit CPU utilization by ANY process with a perl script?
in thread How to limit CPU utilization by ANY process with a perl script?

...or, rather than replacing print(1) with kill(1), why not replace with nice(1) instead - it is what it's there for , after all :-)

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^3: How to limit CPU utilization by ANY process with a perl script?
by MidLifeXis (Monsignor) on Feb 24, 2009 at 14:33 UTC

    However, in the case of an idle system, nice will not limit use to <= 70%. If the system is idle, it will still use as much as it needs to do what it is trying to do.

    This is an issue for the OS scheduler, or each program needs to give up the processor voluntarily if it goes over 70%.

    Update: or use something with SIGSTOP/SIGCONT - see tilly's post below.

    --MidLifeXis