2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-08 05:15:10 +00:00
git-svn-id: https://svn.fhem.de/fhem/trunk@19418 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2019-05-20 12:03:23 +00:00
parent d43f294de3
commit 1b9d0c5704

View File

@ -629,6 +629,19 @@ SYSSTAT_getUptime($)
$uptime += $minutes; $uptime += $minutes;
$uptime *= 60; $uptime *= 60;
$uptime += $seconds; $uptime += $seconds;
} elsif( $uptime && $uptime =~ m/(\d+)\s\D+,\s(\d+):(\d+).\d+/ ) {
my $hours = $1;
my $minutes = $2;
my $seconds = $3;
$uptime = 0;
$uptime += $hours;
$uptime *= 60;
$uptime += $minutes;
$uptime *= 60;
$uptime += $seconds;
} }
} }
@ -637,7 +650,6 @@ SYSSTAT_getUptime($)
my $uptime = SYSSTAT_readFile($hash,"/proc/uptime",""); my $uptime = SYSSTAT_readFile($hash,"/proc/uptime","");
if($uptime) { if($uptime) {
$uptime = $1 if ( $uptime && $uptime =~ /^\s*([0-9.]+)\s+([0-9.]+)/ ); $uptime = $1 if ( $uptime && $uptime =~ /^\s*([0-9.]+)\s+([0-9.]+)/ );
if( AttrVal($name, "uptime", 0) != 2 ) { if( AttrVal($name, "uptime", 0) != 2 ) {
@ -736,6 +748,7 @@ SYSSTAT_getStat($)
=pod =pod
=item device =item device
=item summary system statistics for the host FHEM runs on or a remote system
=begin html =begin html
<a name="SYSSTAT"></a> <a name="SYSSTAT"></a>