Re: how to calculate the system idle time

From: Richard B. Johnson (
Date: Mon Jul 21 2003 - 08:35:56 EST

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...

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
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:42 EST