Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #455 > unrolled thread

How to find cause of boot?

Started byJosef Moellers <josef.moellers@invalid.invalid>
First post2012-07-28 14:38 +0200
Last post2012-07-29 09:42 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.os.linux.development.system


Contents

  How to find cause of boot? Josef Moellers <josef.moellers@invalid.invalid> - 2012-07-28 14:38 +0200
    Re: How to find cause of boot? Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> - 2012-07-29 09:42 +0200

#455 — How to find cause of boot?

FromJosef Moellers <josef.moellers@invalid.invalid>
Date2012-07-28 14:38 +0200
SubjectHow to find cause of boot?
Message-ID<a7i4qvFf4tU2@mid.individual.net>
I'd like to find out why my system was booted: because someone hit the
power button or whether it was woken by the on-board RTC.
The background is that I use a small system as a PVR but it can only set
the wakeup timer a max of one day in advance. So, when the machine is
woken by the RTC, I'd like to check whether a recording is imminent and,
if not, shut down again.

Josef

[toc] | [next] | [standalone]


#456

FromWolfram Gloger <wmglo@dent.med.uni-muenchen.de>
Date2012-07-29 09:42 +0200
Message-ID<u4fw8bxbbf.fsf@md.dent.med.uni-muenchen.de>
In reply to#455
Josef Moellers <josef.moellers@invalid.invalid> writes:

> I'd like to find out why my system was booted: because someone hit the
> power button or whether it was woken by the on-board RTC.

Power button pressed:  I do not know of a way to detect this and
strongly suspect it's impossible.

RTC:  How do you set the wakeup time?  Ages ago, I wrote a tool
to do this by programming RTC registers directly:

http://malloc.de/tools/wakeup_clock.c

I suspect by now you're setting via some acpi kernel function?  If you
can't read back the wakeup time, you may be able to identify the RTC
registers with the above tool.  Then at boot check whether you're some
seconds past the programmed time and if so do your PVR check and possibly
shutdown.

Regards,
Wolfram.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.development.system


csiph-web