Personal computing discussed

Moderators: renee, farmpuma, just brew it!

 
kitsura
Gerbil Team Leader
Topic Author
Posts: 203
Joined: Sat Nov 09, 2002 11:39 pm
Location: In front of my computer, Duh...

Ubuntu Script Request

Wed May 14, 2008 12:53 am

Wonder if anyone has or can come up with a script to automatically get the process id of the Fahcore and change it to a higher priority. Currently I'm manually pgrepping and reniceing it but a script would be great.
 
Pax-UX
Gerbil Elite
Posts: 792
Joined: Wed Aug 25, 2004 6:33 am
Location: Ireland

Re: Ubuntu Script Request

Wed May 14, 2008 1:26 am

Something like things should work:

./fah6 -forceasm -smp -verbosity 9 &
renice -n -2 -p $!
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo 3 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load

This will give the process created a nice value of 18, don't know if it will give all 4 a value of 18, but the first will be 18.

The magic here is '$!' which is the Process ID of the last execute program, in this case Folding client.
"What luck for rulers, that men do not think"
 
kitsura
Gerbil Team Leader
Topic Author
Posts: 203
Joined: Sat Nov 09, 2002 11:39 pm
Location: In front of my computer, Duh...

Re: Ubuntu Script Request

Wed May 14, 2008 6:58 am

I'm running Ubuntu 7.10 and the directory /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load doesn't exist.
 
monts
Gerbil Jedi
Posts: 1537
Joined: Sat May 07, 2005 7:58 pm
Location: Western Australia (Gods Own Country for those uncertain)

Re: Ubuntu Script Request

Wed May 14, 2008 7:28 am

Just wondering if this was to force the cpu to run at full speed. I had a problem when I first started the linux-smp client that the cpu was still only running at the speedstep point (only 1.6GHz not the 2.4CHz it should run at) was that the powernowd daemon wasn't looking at the nice processes when calculating the speed of the cpu. since I've changed that I've shaved about fourteen hours off the time it takes the wu to finish (approx 45% of the time taken).

Given half a sober moment (obviously not at the moment) I'll post the steps change it later.
iMac 27” | MacBook Air.
Cricket and AFL (Fremantle Dockers) tragic.

Who is online

Users browsing this forum: No registered users and 34 guests
GZIP: On