fix: read the system load for SystemLoad filter terms when uptime prints a decimal comma

This commit is contained in:
singhharsh1708 committed 2026-11-21 12:45:04 +05:30
1 parent 8b3d931a4b
commit a5a2fcb28e
2 files changed
+52 -2

No files matched your search

+3 -2
View File
@@ -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;