Parsing log files for test results

Andy Whitcroft apw at canonical.com
Tue Dec 6 16:45:45 UTC 2011


On Mon, Dec 05, 2011 at 05:29:44PM -0500, Marc Tardif wrote:
> Hi folks,
> 
> After a user has been running a proposed kernel for a couple days, I would
> like to parse the logs of the system to detect what parts of the kernel
> might have been tested implicitly during that period. These results could
> then be uploaded to Launchpad, with the consent of the user of course,
> without having to actually run tests manually. [1]
> 
> First, I would like to consider suspending. I looked in /var/log/syslog
> where I found strings that could be parsed to detect a successful wakeup
> from suspend:
> 
>   kernel: [  137.402845] ACPI: Waking up from system sleep state S3
> 
> However, the problem is that syslog does not seem to contain the kernel
> version to validate that the proposed kernel is effectively being tested.
> 
> So, I then discovered /var/log/pm-suspend.log which contained both the
> kernel version and the result of resuming from suspend:
> 
>   Linux 200910-4253 3.0.0-12-generic #20-Ubuntu SMP Fri Oct...
>   [snip]
>   /var/lib/pm-utils/sleep.d/00kernel-change resume suspend: success.
> 
> Second, I would also like to consider the same for hibernating. I looked
> at /var/log/pm-suspend.log which also seemed to contain the result of
> thawing from hibernate:
> 
>   /var/lib/pm-utils/sleep.d/000kernel-change thaw hibernate: success.
> 
> Would you say that these are reliable ways to detect that suspend and
> hibernate were successful?

Cirtianly the other testing scripts I have seen use those same files
from pm-utils to work out if suspend-resume/hibernate-resume worked
correctly.  As Tim points out they are not something we control however.

I would also expect to see the kernel version in syslog, prior to the
s/r, though if the machine has been up a long time it may be rolled out:

/var/log/syslog.6.gz:Nov 28 22:26:15 dm kernel: [    0.000000] Linux version 3.2.0-2-generic (root at gomeisa) (gcc version 4.6.2 (Ubuntu/Linaro 4.6.2-2ubuntu1) ) #4~pre1 SMP Thu Nov 24 16:42:07 UTC 2011 (Ubuntu 3.2.0-2.4~pre1-generic 3.2.0-rc3)

-apw




More information about the kernel-team mailing list