bugfix: warnungs

git-svn-id: https://svn.fhem.de/fhem/trunk@7942 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
hexenmeister
2015-02-11 19:00:33 +00:00
parent a720c6811b
commit 12f4465360

View File

@@ -1507,15 +1507,17 @@ SYSMON_getLoadAvg($$)
{
my ($hash, $map) = @_;
#my $la_str = qx(cat /proc/loadavg );
my $la_str = SYSMON_execute($hash, "cat /proc/loadavg");
my ($la1, $la5, $la15, $prc, $lastpid) = split(/\s+/, trim($la_str));
$map->{+LOADAVG}="$la1 $la5 $la15";
#$map->{"load"}="$la1";
#$map->{"load5"}="$la5";
#$map->{"load15"}="$la15";
if(defined($la_str)) {
my ($la1, $la5, $la15, $prc, $lastpid) = split(/\s+/, trim($la_str));
if(defined($la1) && defined($la5) && defined($la15)) {
$map->{+LOADAVG}="$la1 $la5 $la15";
#$map->{"load"}="$la1";
#$map->{"load5"}="$la5";
#$map->{"load15"}="$la15";
}
}
return $map;
}