mirror of https://github.com/mikaku/Monitorix.git
Merge pull request #218 from rabagliati/master
negative ipmi thermal margin
This commit is contained in:
commit
7f0fde037f
20
lib/ipmi.pm
20
lib/ipmi.pm
|
@ -78,15 +78,15 @@ sub ipmi_init {
|
||||||
push(@last, "RRA:LAST:0.5:1440:" . (365 * $n));
|
push(@last, "RRA:LAST:0.5:1440:" . (365 * $n));
|
||||||
}
|
}
|
||||||
for($n = 0; $n < scalar(my @sl = split(',', $ipmi->{list})); $n++) {
|
for($n = 0; $n < scalar(my @sl = split(',', $ipmi->{list})); $n++) {
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s1:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s1:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s2:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s2:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s3:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s3:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s4:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s4:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s5:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s5:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s6:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s6:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s7:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s7:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s8:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s8:GAUGE:120:U:U");
|
||||||
push(@tmp, "DS:ipmi" . $n . "_s9:GAUGE:120:0:U");
|
push(@tmp, "DS:ipmi" . $n . "_s9:GAUGE:120:U:U");
|
||||||
}
|
}
|
||||||
eval {
|
eval {
|
||||||
RRDs::create($rrd,
|
RRDs::create($rrd,
|
||||||
|
@ -158,7 +158,7 @@ sub ipmi_update {
|
||||||
$str = trim($i);
|
$str = trim($i);
|
||||||
$unit = $ipmi->{units}->{$e};
|
$unit = $ipmi->{units}->{$e};
|
||||||
foreach(@data) {
|
foreach(@data) {
|
||||||
if(/^($str)\s+\|\s+(\d+\.*\d*)\s+$unit\s+/) {
|
if(/^($str)\s+\|\s+(-?\d+\.*\d*)\s+$unit\s+/) {
|
||||||
my $val = $2;
|
my $val = $2;
|
||||||
$sens[$e][$e2] = $val;
|
$sens[$e][$e2] = $val;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use File::Basename;
|
||||||
use FindBin qw($Bin);
|
use FindBin qw($Bin);
|
||||||
use lib $Bin . "/lib", "/usr/lib/monitorix";
|
use lib $Bin . "/lib", "/usr/lib/monitorix";
|
||||||
|
|
||||||
|
@ -236,7 +237,7 @@ sub graph_footer {
|
||||||
|
|
||||||
# MAIN
|
# MAIN
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
open(IN, "< monitorix.conf.path");
|
open(IN, dirname(__FILE__)."/monitorix.conf.path");
|
||||||
my $config_path = <IN>;
|
my $config_path = <IN>;
|
||||||
chomp($config_path);
|
chomp($config_path);
|
||||||
close(IN);
|
close(IN);
|
||||||
|
|
Loading…
Reference in New Issue