From 727fdb44a0bc7f2dc3180fb5abf8379a3e4706b8 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 23 Nov 2009 09:53:24 +0000 Subject: [PATCH] +load average. --- FAQ | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/FAQ b/FAQ index 2a7e9c73..26e6b31b 100644 --- a/FAQ +++ b/FAQ @@ -201,4 +201,12 @@ on the Window -> Translation configuration page. For example, change UTF-8 to ISO-8859-1 or CP437. It may also be necessary to adjust the way PuTTY treats line drawing characters in the lower part of the same configuration page. -$Id: FAQ,v 1.29 2009-08-08 20:46:26 nicm Exp $ +* What is the best way to display the load average? Why no #L? + +It isn't possible to get the load average portably in code and it is preferable +not to add portability goop. The following works on at least Linux, *BSD and OS +X: + +uptime|awk '{split(substr($0, index($0, "load")), a, ":"); print a[2]}' + +$Id: FAQ,v 1.30 2009-11-23 09:53:24 nicm Exp $