How to monitor a process efficiently
How to monitor a process efficiently
- Subject: How to monitor a process efficiently
- From: Whit Anderson <email@hidden>
- Date: Wed, 14 Jul 2004 20:31:26 -0500
3D rendering take a long time, sometimes many hours. Some people set
sleep to "never" in preferences to keep their computer from going to
sleep while rendering (while they goes home and go to sleep).
Some 3D modelers would like to have the render finish, and then have
the computer go to sleep.
I've started an AppleScript that uses "do shell" to find the amount of
CPU usage by their rendering program. When the CPU usage drops to zero,
the AppleScript puts the computer to sleep.
In pseudo code, my script is basically:
set howManyMinutesToWait to 5
repeat while not (rendering program CPU usage is zero)
check rendering program CPU usage
if rendering program CPU usage is zero then
sleep
else
delay 60 * howManyMinutesToWait
end if
end repeat
The problem is that during that "delay 60 * howManyMinutesToWait", my
script is using the CPU enough to slow down the rendering. Is there a
more efficient way to approach this?
--Whit
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.