From d3465bd7a7ee8e97d2efb7502c3a400c4eee1018 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Tue, 7 Apr 2015 12:55:41 +0200 Subject: [PATCH] show Load average --- systempony | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/systempony b/systempony index 27652a1..158bb63 100755 --- a/systempony +++ b/systempony @@ -4,7 +4,7 @@ # Name of the pony PONY=random # What info to show (must have a function defined as ponyget_* to work) -INFO=( User Hostname Distro Kernel Uptime Shell Packages RAM Disk ) +INFO=( User Hostname Distro Kernel Uptime Load Shell Packages RAM Disk) # File system type to show disk usage (default/empty=all) (see df for specific values) FSTYPE= @@ -72,6 +72,11 @@ function ponyget_Uptime() sed -r -e "s/up\s*(.+),\s*[0-9]+\s*user/\1/" -e "s/\s+/ /g" } +function ponyget_Load() +{ + uptime | sed -r -e "s/.*load average:\s*//" +} + function ponyget_Packages() { if which dpkg &>/dev/null