System idle time under Linux
usenet-nospam at seebs.net
Wed Sep 29 19:27:13 CEST 2010
On 2010-09-29, Hugo L?veill? <hugol at fastmail.net> wrote:
> I have found it for windows and mac, but no luck under linux. Any idea?
I don't think it's semantically well-defined. What makes a system "idle"?
Is the machine in my basement idle? I don't think anyone's touched the
keyboard in a week, but it's spent a big chunk of that time with 100% CPU
load across all eight processors, and I was running a bunch of work on
it yesterday, including interactive sessions.
Windows and Mac systems *typically* have a well-defined "console" on which
the primary user is active... But as a counterexample, my news reader is
actually running on an OS X box that's about fifty feet from me, which I
connect to via ssh.
I would be very curious to see whether your test for "system idle time"
would realize that the machine I'm currently working on is actively in use,
even though I don't think the console is even logged in...
Basically, I can't help you, but I can tell you that you are quite possibly
asking the wrong question.
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
More information about the Python-list