Hi, "uptime" output on OpenBSD and FreeBSD (so probably NetBSD and
DragonflyBSD too) look similar to this:
2:22PM up 30 days, 13:44, 1 user, load averages: 0.06, 0.09, 0.13
so this diff should fix "uptime|" parsing in niceload:
--- /tmp/parallel-20121022/src/niceload Mon Oct 22 23:20:41 2012
+++ /usr/local/bin/niceload Wed Oct 31 14:10:28 2012
@@ -569,7 +569,7 @@
close IN;
} elsif (open(IN,"uptime|")) {
my $upString = <IN>;
- if($upString =~ m/average.\s*(\d+\.\d+)/) {
+ if($upString =~ m/averages?.\s*(\d+\.\d+)/) {
$loadavg = $1;
} else {
::die_bug("uptime");
Drop me a line whether it's ok.
--
Michał Markowski