Re: uptime increases during suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 27 Mar 2006, Peter T. Breuer wrote:

> In article <1143484821.2168.16.camel@leatherman> you wrote:
>>> Would it be possible to get the old behaviour back?
>
>> Why exactly do you want this behavior? Maybe a better explanation would
>> help stir this discussion.
>
> I don't know why he wants it (uptime does not increase during
> hibernation) but I want it so that I can tell if I should time out or
> not on an alarm for inactivity in userspace!  The alarm should fire if
> there has been no activity for a while (30s) while activity is possible.
> If the machine is suspended, no activity is possible, so the alarm
> should not fire.
>
> This is to counteract sysadamins playing with system time (e.g. syncing
> with a net time server after bootup) which might cause artificial time
> outs. Causing a timeout has nasty consequences when, for example, your
> root fs is mounted over the net via daemons that do the network to-ing
> and fro-ing from userspace. The only way they have of getting an
> estimate of REAL time elapsed,  without admin playing about messing
> with them, is by surreptitiously snooping uptime, which more or less
> represents kernel jiffies.
>
> If you change uptime to not represente kernel jiffies, goodbye the last
> hope for counting CPU time passed from userspace. False timeouts WILL
> ensue, and root mounts will fail.
>
> Peter

Well uptime code can be modified to subtract the time (if any) in
hibernation. Then everybody is happy.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.15.4 on an i686 machine (5589.42 BogoMips).
Warning : 98.36% of all statistics are fiction, book release in April.
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux