show Load average

This commit is contained in:
Mattia Basaglia 2015-04-07 12:55:41 +02:00
parent c0fa97502d
commit d3465bd7a7

View file

@ -4,7 +4,7 @@
# Name of the pony # Name of the pony
PONY=random PONY=random
# What info to show (must have a function defined as ponyget_* to work) # 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) # File system type to show disk usage (default/empty=all) (see df for specific values)
FSTYPE= FSTYPE=
@ -72,6 +72,11 @@ function ponyget_Uptime()
sed -r -e "s/up\s*(.+),\s*[0-9]+\s*user/\1/" -e "s/\s+/ /g" 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() function ponyget_Packages()
{ {
if which dpkg &>/dev/null if which dpkg &>/dev/null