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

NAME

Sysstat::Sar - Sysstat sar file parser

VERSION

version 0.001

SYNOPSIS

    This module parse sar file output to perl data structure for easy manipulation.
    To turn on diagnostics, set SMART_COMMENTS=1 to environment variable.
    Some additional value is added like min and max value for each day / all records in a day.

    'hostname' => {
                      '08/28/16' => {
                                      'totalcpu' => '(4CPU)',
                                      'kernel' => '2.6.32-431.29.2.el6.x86_64',
                                      'cpu' => {
                                                 '1' => [
                                                          [
                                                            '00:10:01',
                                                            '0.14',
                                                            '0.00',
                                                            '0.13',
                                                            '0.00',
                                                            '0.00',
                                                            '0.00',
                                                            '0.00',
                                                            '0.00',
                                                            '99.73'
                                                          ],
                                                          [
                                                            '00:20:01',
                                                            '0.15',
                                                            '0.00',
                                                            '0.12',
                                                            '0.00',
                                                            '0.00',
                                                            '0.00',
                                                            '0.00',
                                                            '0.00',
                                                            '99.73'
                                                          ],
                                        ........ output shorten ................

METHODS

check_header parameter (current line from file handle, hash reference ) This method return a hash reference passed from parse method.

    it will set current position hostname, date, os, kernel version, cpu arch and totalcpu.
    hash structure that being setup are : 
    {hostname}{date}{os}
    {hostname}{date}{kernel}
    {hostname}{date}{arch}
    {hostname}{date}{totalcpu}

parse return parse output in hash

SEE ALSO

AUTHOR

Heince Kurniawan <heince@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Heince Kurniawan <heince@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.