mirror of
https://gitlab.com/mattia.basaglia/ASCII-Pony.git
synced 2024-11-21 19:57:59 +01:00
show Load average
This commit is contained in:
parent
c0fa97502d
commit
d3465bd7a7
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue