The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

BuzzSaw::Filter::Sleep - A BuzzSaw event filter for sleep log entries

VERSION

This documentation refers to BuzzSaw::Filter::Sleep version 0.10.4

SYNOPSIS

   my $filter = BuzzSaw::Filter::Sleep->new();

   while ( defined( my $line = $fh->getline ) ) {
     my %event = $parser->parse_line($line);

     my ( $accept, @tags ) = $filter->check(\%event);

     if ($accept) {
        # store log entry in DB
     }
   }

DESCRIPTION

This is a Moose class which provides a filter which implements the BuzzSaw::Filter role. It is used to filter log entries and find those associated with ACPI sleep. The module reports on instances of ACPI acpi_sleep and acpi_wake. When an event is accepted by the Sleep filter module it returns a sleep tag along with one of acpi_sleep or acpi_wake.

Note that this filter depends on the following two commands being executed by the pm-utils package at the time of acpi_sleep or acpi_wake respectively:

   /usr/bin/logger -t lcfg-sleep "Going to sleep"

   /usr/bin/logger -t lcfg-sleep "Waking up"

The BuzzSaw project provides a suite of tools for processing log file entries. Entries in files are parsed and filtered into a set of events of interest which are stored in a database. A report generation framework is also available which makes it easy to generate regular reports regarding the events discovered.

ATTRIBUTES

name

The short name of the module. The default is to use the final part of the Perl module name lower-cased (e.g. the name of BuzzSaw::Filter::Sleep is sleep).

SUBROUTINES/METHODS

( $accept, @tags ) = $filter->check(\%event)

This method checks for log entries which are associated with sleep. It does this by looking for lines where the program attribute is set to lcfg-sleep. If that matches then it looks to see if the message is "Waking up" or "Going to sleep". If an event is accepted for storage then the accept variable will be set to true and a set of tags will be returned which contain sleep and one of acpi_sleep or acpi_wake.

DEPENDENCIES

This module is powered by Moose. This module implements the BuzzSaw::Filter Moose role.

SEE ALSO

BuzzSaw, BuzzSaw::Parser

PLATFORMS

This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.

ScientificLinux6

BUGS AND LIMITATIONS

Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.

AUTHOR

    Stephen Quinney <squinney@inf.ed.ac.uk>

LICENSE AND COPYRIGHT

    Copyright (C) 2012-2013 University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.