fix: cpu_diff

git-svn-id: https://svn.fhem.de/fhem/trunk@9269 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
hexenmeister 2015-09-17 19:39:41 +00:00
parent d75212faf6
commit fdbe2696fd

View File

@ -135,7 +135,7 @@ SYSMON_Initialize($)
$hash->{AttrList} = "filesystems network-interfaces user-defined disable:0,1 nonblocking:0,1 ".
"telnet-time-out ".
"user-fn2 user-fn ".
"telnet-prompt-regx telnet-login-prompt-regx telnet-login-none:0,1 ".
"telnet-prompt-regx telnet-login-prompt-regx ".
"exclude ".
$readingFnAttributes;
}
@ -2210,7 +2210,7 @@ SYSMON_getCPUProcStat_intern($$$)
$CPUsoftirq = $neuCPUsoftirq - $altCPUsoftirq;
}
#$map->{$pName."_diff"}=$CPUuser." ".$CPUnice." ".$CPUsystem." ".$CPUidle." ".$CPUiowait." ".$CPUirq." ".$CPUsoftirq;
$map->{$pName."_diff"}=$CPUuser." ".$CPUnice." ".$CPUsystem." ".$CPUidle." ".$CPUiowait." ".$CPUirq." ".$CPUsoftirq;
my $GesammtCPU = $CPUuser + $CPUnice + $CPUsystem + $CPUidle + $CPUiowait + $CPUirq + $CPUsoftirq;
my $PercentCPUuser = ($CPUuser / $GesammtCPU) * 100;
@ -3814,9 +3814,7 @@ sub SYSMON_Open_Connection($)
# }
#}
my $tlogin_none=AttrVal($name,'telnet-login-none','0');
if(!$tlogin_none && !defined($pwd)) {
if(!defined($pwd)) {
$msg="Error: no passwort provided";
SYSMON_Log($hash, 3, $msg);
return $msg unless defined $pwd;
@ -3836,7 +3834,6 @@ sub SYSMON_Open_Connection($)
}
$hash->{".telnet"}=$telnet;
if(!$tlogin_none) {
SYSMON_Log($hash, 5, "Wait for user or password prompt.");
unless ( ($before,$match) = $telnet->waitfor('/(user|login|password): $/i') )
{
@ -3876,7 +3873,6 @@ sub SYSMON_Open_Connection($)
SYSMON_Log($hash, 5, "Entering password");
$telnet->print( $pwd );
}
SYSMON_Log($hash, 5, "Wait for command prompt");
my $tlogin_prompt=AttrVal($name,'telnet-login-prompt-regx','(#|\$|>)\s*$|Login failed.');
@ -5173,10 +5169,6 @@ If one (or more) of the multiplier is set to zero, the corresponding readings is
RegExp to detect login and command line prompt. (Only for access via Telnet.)
</li>
<br>
<li>telnet-login-none<br>
set it to 1 when no user and password are required
</li>
<br>
<li>exclude<br>
Allows to suppress reading certain information. <br>
supported values: user-defined (s. user-defined und user-fn), cpucount, uptime, fhemuptime,
@ -5846,10 +5838,6 @@ If one (or more) of the multiplier is set to zero, the corresponding readings is
RegExp zur Erkennung von Login- und Kommandozeile-Prompt. (Nur f&uuml;r Zugriffe &uuml;ber Telnet relevant.)
</li>
<br>
<li>telnet-login-none<br>
soll auf 1 gesetzt werden, wenn kein User und Passwort zum Login notwendig sind.
</li>
<br>
<li>exclude<br>
Erlaubt das Abfragen bestimmten Informationen zu unterbinden. <br>
Mögliche Werte: user-defined (s. user-defined und user-fn), cpucount, uptime, fhemuptime,