[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Detection of hibernation wake-up
From:       "A.J. Venter" <aj () outkastsolutions ! co ! za>
Date:       2008-10-22 7:03:24
Message-ID: 868cfe70810220003p3ba4c3adse6c8083d301d9f7e () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Oct 22, 2008 at 2:25 AM, David Boosalis <david.boosalis@gmail.com>wrote:

> One way you can do it is to parse the /var/log/kernel.log. For start ups
> for suspends you will see something like
> Oct 21, 16,:49:33 hunter kernel: PM::Finishing wakeup.
>
> A few checks, sprinkled with a few boolean flags, perhaps a look at current
> system time  might be enough info to determine if you are coming back from a
> suspend.  Not a real sophisticated solution is it.
>
> That would be... less than ideal. Firstly syslog is Unix specific, and
secondly the logpaths are config specific (and there is no standard across
distros - a lot of them have a completely log in /var/log/message and some
have almost nothing in it, and even detecting the distro won't help since
 users can change the config).Basically relying on syslog would be terrible,
even on Unix. You may get better results parsing the output of dmesg though,
at least that is standard and will always have all kernel messages.

It's still far from ideal but it's a step closer than checking syslog files.

A.J.
-- 
A.J. Venter
Tel.: +27 21 554 5059
Fax: +27 11 252 9197
Outkast Solutions IT
www.outkastsolutions.co.za
A division of Global Pact Trading Pty Ltd.

www.silentcoder.co.za - Blog
scartoonz.silentcoder.co.za - ScarToonz webcomic

[Attachment #5 (text/html)]

<div class="gmail_quote">On Wed, Oct 22, 2008 at 2:25 AM, David Boosalis <span \
dir="ltr">&lt;<a href="mailto:david.boosalis@gmail.com">david.boosalis@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> One way you can do it is to parse the \
/var/log/kernel.log. For start ups for suspends you will see something like<br>Oct \
21, 16,:49:33 hunter kernel: PM::Finishing wakeup.<br><br>A few checks, sprinkled \
with a few boolean flags, perhaps a look at current system time&nbsp; might be enough \
info to determine if you are coming back from a suspend.&nbsp; Not a real \
sophisticated solution is it.<br>

<br></blockquote></div>That would be... less than ideal. Firstly syslog is Unix \
specific, and secondly the logpaths are config specific (and there is no standard \
across distros - a lot of them have a completely log in /var/log/message and some \
have almost nothing in it, and even detecting the distro won&#39;t help since \
&nbsp;users can change the config).<div> Basically relying on syslog would be \
terrible, even on Unix. You may get better results parsing the output of dmesg \
though, at least that is standard and will always have all kernel \
messages.</div><div><br></div><div>It&#39;s still far from ideal but it&#39;s a step \
closer than checking syslog files.</div> <div><br></div><div>A.J.<br>-- <br>A.J. \
Venter<br>Tel.: +27 21 554 5059<br>Fax: +27 11 252 9197<br>Outkast Solutions IT<br><a \
href="http://www.outkastsolutions.co.za">www.outkastsolutions.co.za</a><br>A division \
of Global Pact Trading Pty Ltd.<br> <br><a \
href="http://www.silentcoder.co.za">www.silentcoder.co.za</a> - Blog<br><a \
href="http://scartoonz.silentcoder.co.za">scartoonz.silentcoder.co.za</a> - ScarToonz \
webcomic<br> </div>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic