Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find cause of boot?

17 views
Skip to first unread message

Josef Moellers

unread,
Jul 28, 2012, 8:38:55 AM7/28/12
to
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

Wolfram Gloger

unread,
Jul 29, 2012, 3:42:44 AM7/29/12
to
Josef Moellers <josef.m...@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.

0 new messages