mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 12:14:36 -05:00
fix: read the system load for SystemLoad filter terms when uptime prints a decimal comma
This commit is contained in:
1 parent
8b3d931a4b
commit
a5a2fcb28e
2 files changed
+52
-2
No files matched your search
@@ -709,8 +709,9 @@ sub getLoad {
|
||||
my $command = 'uptime';
|
||||
my $uptime = qx( $command );
|
||||
my $load = -1;
|
||||
if ( $uptime =~ /load averages?:\s+([\d.]+)/ms ) {
|
||||
$load = $1;
|
||||
# Locales with a decimal comma print "load average: 2,52, 1,58, 0,59"
|
||||
if ( $uptime =~ /load averages?:\s+(\d+(?:[.,]\d+)?)/ms ) {
|
||||
($load = $1) =~ tr/,/./;
|
||||
Info("Load: $load");
|
||||
}
|
||||
return $load;
|
||||
|
||||
Reference in new issue
Block a user