detecting idle processor

piet at cs.uu.nl piet at cs.uu.nl
Mon Jun 11 07:04:17 EDT 2001


>>>>> s_gherman at yahoo.com (Sorin Gherman) (SG) writes:

SG> How can I use Python to detect when the processor is idle? 

You can't because the processor wouldn't be idle if your Python program is
running. So you first have to define what you mean with "idle".

SG> Or when the network traffic is idle, for a given computer?

That is very much system dependent.

SG> I need this to implement a background program.

The easiest is probably to run your program at a low priority.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list