From 00a2b4d11990f66cbb49031a74bb5817554c7842 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 31 Oct 2012 21:09:47 +0100 Subject: [PATCH] =?UTF-8?q?Load=20avg=20on=20BSD:=20Micha=C5=82=20Markowsk?= =?UTF-8?q?i=20says:=20"uptime"=20output=20on=20OpenBSD=20and=20FreeBSD=20?= =?UTF-8?q?(so=20probably=20NetBSD=20and=20DragonflyBSD=20too)=20look=20si?= =?UTF-8?q?milar=20to=20this:=20=202:22PM=20=20up=2030=20days,=2013:44,=20?= =?UTF-8?q?1=20user,=20load=20averages:=200.06,=200.09,=200.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/niceload | 2 +- src/parallel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/niceload b/src/niceload index 064a596a..1ee67064 100755 --- a/src/niceload +++ b/src/niceload @@ -569,7 +569,7 @@ sub load_status_linux { close IN; } elsif (open(IN,"uptime|")) { my $upString = ; - if($upString =~ m/average.\s*(\d+\.\d+)/) { + if($upString =~ m/averages?.\s*(\d+\.\d+)/) { $loadavg = $1; } else { ::die_bug("uptime"); diff --git a/src/parallel b/src/parallel index 3dd74702..bcb62c8e 100755 --- a/src/parallel +++ b/src/parallel @@ -2395,7 +2395,7 @@ sub loadavg { my $uptime_out = <$uptime_fh>; close $uptime_fh; # load average: 0.76, 1.53, 1.45 - if($uptime_out =~ /load average: (\d+.\d+)/) { + if($uptime_out =~ /load averages?: (\d+.\d+)/) { $self->{'loadavg'} = $1; ::debug("New loadavg: ".$self->{'loadavg'}); } else {