Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Renice script problems - explained' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Renice script problems - explained
Authored by: klieb2002 on May 26, '02 08:51:47PM

The Unix script posted above is in a debugging form - a lot of Unix script writers create a script, and in the place where the real action happens - renice +15 $1 in this case - they simply echo what the command line would see and execute. That way you can run the script and be certain it will do what you want it to do before committing to doing it. So, to make this script functional you would need to remove the 'echo' from in front of the renice command.

By the way, under 10.1.4 it appears that the Classic environment only appears as a single process - there is no Classic process running in addition to TruBlueEnvironment. This makes it possible to remove the loop from the script above, which gets rid of the remaining errors in the script. The simplified script is then:

================= start of script ===============

set -- `ps -x -c -o pid,command | fgrep TruBlueEnv | fgrep -v grep`

renice +15 $1

================= end of script ================

Even using renice to lower the priority of Classic doesn't really starve it of cpu cycles, however; it still grabs whatever is going unused by the other processes. I was hoping to lower the energy usage of Classic; I've noticed a direct correlation between my use of Classic mode under OS X, and the fan of the TiBook: the more you use Classic, the more the fan comes on. My guess is that the energy-saving strategies of Classic and OS X are incompatible in some way. If you think of a way to lower CPU usage on Classic further, please post a reply.

[ Reply to This | # ]