The Following User Says Thank You to qwerty12 For This Useful Post: | ||
![]() |
2008-06-24
, 06:51
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#2
|
If you need to increase the priority of a job, like cdrecord or MP3 or DVD players, this isn't really a job for and(8) but for a wrapper. Due to popular demand, I wrote such a wrapper. Get the code.
AND is very flexible. The renice intervals can be adjusted as well as the default nice level and the activation intervals. A priority database stores user/group/job/ancestor tuples along with their renice values for three CPU usage time ranges. Negative nice levels are interpreted as signals to be sent to a process, triggered by CPU usage; this way, Netscapes going berserk can be killed automatically. The strategy for searching the priority database can be configured.
AND also provides network-wide configuration files with host-specific sections, as well as wildcard/regexp support for commands in the priority database.
Iterating through the list of processes is a highly O/S-specific task, so AND will only run on the O/Ses listed on the left.
Warning: cpufreq sucks on the tablets so don't start pissin on me if everyting gets killed. Also, this is quite old.
Edit, I compiled the wrapper mentioned:
http://www.mediafire.com/?hyyx2lddcgs
Last edited by qwerty12; 2008-06-23 at 16:42.