mirror of
https://gitlab.com/mattia.basaglia/ASCII-Pony.git
synced 2024-11-23 20:48:00 +01:00
Show hyperthreads
This commit is contained in:
parent
43b51b408d
commit
5b4f239d84
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 IP Distro Kernel Uptime Load Shell Packages RAM CPU Swap Disk)
|
||||
INFO=(User Hostname IP Distro Kernel Uptime Load Shell Packages CPU Threads RAM Swap Disk)
|
||||
# File system type to show disk usage (default/empty=all) (see df for specific values)
|
||||
FSTYPE=
|
||||
# Interface to get the IP address from
|
||||
|
@ -83,6 +83,11 @@ function ponyget_CPU()
|
|||
cat /proc/cpuinfo | grep "model name" | head -n 1 | sed -r "s/model name\s: //"
|
||||
}
|
||||
|
||||
function ponyget_Threads()
|
||||
{
|
||||
nproc --all
|
||||
}
|
||||
|
||||
function ponyget_CPU_Usage()
|
||||
{
|
||||
printf %.1f%% "$(top -b -n1 | grep "Cpu(s):" | sed -r -e "s/^[^0-9]+//" -e "s/[^0-9]+,\s+/ + /g" -e "s/[^0-9]+$//" | cut -d ' ' -f 1-5 | bc)"
|
||||
|
|
Loading…
Reference in a new issue