• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to monitor a process efficiently
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: How to monitor a process efficiently
      • From: Graff <email@hidden>
  • Prev by Date: Need an AppleScript way to do this shell script
  • Next by Date: Re: Need an AppleScript way to do this shell script
  • Previous by thread: Re: Need an AppleScript way to do this shell script
  • Next by thread: Re: How to monitor a process efficiently
  • Index(es):
    • Date
    • Thread