All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: how to calculate the system idle time
  2003-07-21 21:11 how to calculate the system idle time snoopyzwe
@ 2003-07-21 13:35 ` Richard B. Johnson
  2003-07-21 21:55   ` snoopyzwe
  0 siblings, 1 reply; 6+ messages in thread
From: Richard B. Johnson @ 2003-07-21 13:35 UTC (permalink / raw)
  To: snoopyzwe; +Cc: linux-kernel

On Mon, 21 Jul 2003, snoopyzwe wrote:

> I want to implement a module, whose main task is to check the system
> idle time(no keyboard and mouse input) and suspend the whole system(when
> the idle time is long enough). But there comes the problem, how to
> calculate the system idle time. How can I get the time user has no
> operation.
> thanks
> snoopyzwe
>

The the source-code of `top` and review it. Make a user-mode
daemon to watch the system...


Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to calculate the system idle time
  2003-07-21 21:55   ` snoopyzwe
@ 2003-07-21 15:45     ` Lucas Correia Villa Real
  2003-07-21 16:17       ` Mathieu Chouquet-Stringer
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas Correia Villa Real @ 2003-07-21 15:45 UTC (permalink / raw)
  To: snoopyzwe, root; +Cc: linux-kernel

"top" is an utility that cames with the Procps package.

Lucas


On Monday 21 July 2003 18:55, snoopyzwe wrote:
> thanks for you advice
> one foolish question
> what "top" means?
> could you tell me more about how to watch the system?
> thank you very much
> I am a newbie
>
> >On Mon, 21 Jul 2003, snoopyzwe wrote:
> >>I want to implement a module, whose main task is to check the system
> >>idle time(no keyboard and mouse input) and suspend the whole system(when
> >>the idle time is long enough). But there comes the problem, how to
> >>calculate the system idle time. How can I get the time user has no
> >>operation.
> >>thanks
> >>snoopyzwe
> >
> >The the source-code of `top` and review it. Make a user-mode
> >daemon to watch the system...
> >
> >
> >Cheers,
> >Dick Johnson
> >Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
> >            Note 96.31% of all statistics are fiction.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to calculate the system idle time
  2003-07-21 15:45     ` Lucas Correia Villa Real
@ 2003-07-21 16:17       ` Mathieu Chouquet-Stringer
  2003-07-21 16:48         ` Lucas Correia Villa Real
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Chouquet-Stringer @ 2003-07-21 16:17 UTC (permalink / raw)
  To: Lucas Correia Villa Real; +Cc: snoopyzwe, root, linux-kernel

lucasvr@gobolinux.org (Lucas Correia Villa Real) writes:
> "top" is an utility that cames with the Procps package.

But that's probably not what he needs anyway: by idle time he meant "no
keyboard and mouse input". He should take a look at /proc/interrupts IMHO.
-- 
Mathieu Chouquet-Stringer              E-Mail : mathieu@newview.com
       Never attribute to malice that which can be adequately
                    explained by stupidity.
                     -- Hanlon's Razor --

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to calculate the system idle time
  2003-07-21 16:17       ` Mathieu Chouquet-Stringer
@ 2003-07-21 16:48         ` Lucas Correia Villa Real
  0 siblings, 0 replies; 6+ messages in thread
From: Lucas Correia Villa Real @ 2003-07-21 16:48 UTC (permalink / raw)
  To: Mathieu Chouquet-Stringer; +Cc: snoopyzwe, root, linux-kernel

On Monday 21 July 2003 13:17, Mathieu Chouquet-Stringer wrote:
> lucasvr@gobolinux.org (Lucas Correia Villa Real) writes:
> > "top" is an utility that cames with the Procps package.
>
> But that's probably not what he needs anyway: by idle time he meant "no
> keyboard and mouse input". He should take a look at /proc/interrupts IMHO.

Ah, sure! He can give a look on Documentation/filesystems/proc.txt for more 
information about it.

Lucas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* how to calculate the system idle time
@ 2003-07-21 21:11 snoopyzwe
  2003-07-21 13:35 ` Richard B. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: snoopyzwe @ 2003-07-21 21:11 UTC (permalink / raw)
  To: linux-kernel

I want to implement a module, whose main task is to check the system
idle time(no keyboard and mouse input) and suspend the whole system(when
the idle time is long enough). But there comes the problem, how to
calculate the system idle time. How can I get the time user has no
operation.
thanks
snoopyzwe




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to calculate the system idle time
  2003-07-21 13:35 ` Richard B. Johnson
@ 2003-07-21 21:55   ` snoopyzwe
  2003-07-21 15:45     ` Lucas Correia Villa Real
  0 siblings, 1 reply; 6+ messages in thread
From: snoopyzwe @ 2003-07-21 21:55 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

thanks for you advice
one foolish question
what "top" means?
could you tell me more about how to watch the system?
thank you very much
I am a newbie

>On Mon, 21 Jul 2003, snoopyzwe wrote:
>
>  
>
>>I want to implement a module, whose main task is to check the system
>>idle time(no keyboard and mouse input) and suspend the whole system(when
>>the idle time is long enough). But there comes the problem, how to
>>calculate the system idle time. How can I get the time user has no
>>operation.
>>thanks
>>snoopyzwe
>>
>>    
>>
>
>The the source-code of `top` and review it. Make a user-mode
>daemon to watch the system...
>
>
>Cheers,
>Dick Johnson
>Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
>            Note 96.31% of all statistics are fiction.
>
>
>
>
>  
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-07-21 16:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 21:11 how to calculate the system idle time snoopyzwe
2003-07-21 13:35 ` Richard B. Johnson
2003-07-21 21:55   ` snoopyzwe
2003-07-21 15:45     ` Lucas Correia Villa Real
2003-07-21 16:17       ` Mathieu Chouquet-Stringer
2003-07-21 16:48         ` Lucas Correia Villa Real

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.