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 0.01
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');
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';
Returns an array of recognized sensor's names for a given chipset.
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';
Returns an array of recognized flags for a given sensor.
my @flags_names = $s->list_sensor_flags('smsc47b397-isa-0480','temp2'); # Dump @flags_names $VAR1 = 'input'; $VAR2 = 'max'; $VAR3 = 'min'; $VAR4 = 'critic_alarm';
Return the current value of a sensor's flag.
my $value = $s->get_sensor_value('smsc47b397-isa-0480','temp2','input'); # Dump $value $VAR1 = '21.000';
Parse sensors again. The first time is called automatically by the constructor.
"Davide Ticozzi", <"dticozzi at gmail.com">
<"dticozzi at gmail.com">
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.
bug-Hardware-SensorsParser at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Hardware::SensorsParser
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Hardware-SensorsParser
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Hardware-SensorsParser
CPAN Ratings
http://cpanratings.perl.org/d/Hardware-SensorsParser
Search CPAN
http://search.cpan.org/dist/Hardware-SensorsParser/
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.
To install Hardware::SensorsParser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hardware::SensorsParser
CPAN shell
perl -MCPAN -e shell install Hardware::SensorsParser
For more information on module installation, please visit the detailed CPAN module installation guide.