detecting idle processor
William Park
opengeometry at yahoo.ca
Mon Jun 11 15:11:10 EDT 2001
On Mon, Jun 11, 2001 at 12:00:41AM -0700, Sorin Gherman wrote:
> How can I use Python to detect when the processor is idle?
You can run a process with low priority using 'nice', or obtain the
system load by parsing 'uptime'. But, that's in Unix...
> Or when the network traffic is idle, for a given computer?
You can use 'pppstat' for PPP, but I am not sure about ethernet.
>
> I need this to implement a background program.
Easiest solution is 'nice'.
--
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
8 CPUs cluster, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Sc.
More information about the Python-list
mailing list