NAME

Hardware::SensorsParser - Simple parser for Lm-sensors output

This module parse the output of 'sensors' and make it usable for programming. To get this module working you must have package 'lm-sensors' (http://www.lm-sensors.org) installed, configured and working.

VERSION

Version 0.01

SYNOPSIS

use Hardware::SensorsParser;

my $s = new Hardware::SensorsParser();

my @chipset_names = $s->list_chipsets();

my @sensors_names = $s->list_sensors('smsc47b397-isa-0480');

my @flags_names   = $s->list_sensor_flags('smsc47b397-isa-0480','temp2');

my $value         = $s->get_sensor_value('smsc47b397-isa-0480','temp2','input');

CONSTRUCTOR

new

SUBROUTINES/METHODS

list_chipsets

Returns an array of recognized chipsets names.

Example:

my @chipset_names = $s->list_chipsets();

# Dump @chipset_names
$VAR1 = 'smsc47b397-isa-0480';
$VAR2 = 'coretemp-isa-0000'; 

list_sensors

Returns an array of recognized sensor's names for a given chipset.

Example:

my @sensors_names = $s->list_sensors('smsc47b397-isa-0480');

# Dump @sensors_names
$VAR1 = 'fan1';
$VAR2 = 'temp1';
$VAR3 = 'temp4';
$VAR4 = 'temp3';
$VAR5 = 'fan4';
$VAR6 = 'fan3';
$VAR7 = 'fan2';
$VAR8 = 'temp2';

list_sensor_flags

Returns an array of recognized flags for a given sensor.

Example:

my @flags_names = $s->list_sensor_flags('smsc47b397-isa-0480','temp2');

# Dump @flags_names
$VAR1 = 'input';
$VAR2 = 'max';
$VAR3 = 'min';
$VAR4 = 'critic_alarm';

get_sensor_value

Return the current value of a sensor's flag.

Example:

my $value = $s->get_sensor_value('smsc47b397-isa-0480','temp2','input');

# Dump $value
$VAR1 = '21.000';

parse

Parse sensors again. The first time is called automatically by the constructor.

AUTHOR

"Davide Ticozzi", <"dticozzi at gmail.com">

BUGS

Please report any bugs or feature requests to bug-Hardware-SensorsParser at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Hardware-SensorsParser. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Hardware::SensorsParser

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2013 "Davide Ticozzi".

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.