On Wed, Feb 29, 2012 at 11:18:45AM -0500, no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: renicing a process >Author: sauer >Link to topic: https://cfengine.com/forum/read.php?3,25092,25092#msg-25092 > >I need to ensure the priority / "nice level" of some processes is set to a >specific value. I don't see anything in the reference manual which enforces >that as a process attribute. I'm currently thinking that I'll just use a >process_select to find processes whose priority matches the desired value, and >then set a restart class which runs the renice.command (after additional logic >ensuring that the process is actually running, of course). Am I missing a >better way to do this?
Maybe a module would work for this? That may be slight more reusable, since you could just hand it an array of PIDs and new nice levels. In fact, if you use the nice value as the key (instead of the PID), you could probably condense things into a a few calls to 'renice', instead of having to iterate over every PID. -- Jesse Becker NHGRI Linux support (Digicon Contractor) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine