summaryrefslogtreecommitdiffstats
path: root/FAQ
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-11-23 09:53:24 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-11-23 09:53:24 +0000
commit727fdb44a0bc7f2dc3180fb5abf8379a3e4706b8 (patch)
tree4bab85966dbbc304e61cd54b97d9f08c02a3fc56 /FAQ
parent3cb0c8e6508c25530fdf0b0aef4b0402af954f49 (diff)
+load average.
Diffstat (limited to 'FAQ')
-rw-r--r--FAQ10
1 files changed, 9 insertions, 1 deletions
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 $