mirror of
https://gitlab.com/mattia.basaglia/ASCII-Pony.git
synced 2024-11-24 04:57:59 +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
|
# 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 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)
|
# File system type to show disk usage (default/empty=all) (see df for specific values)
|
||||||
FSTYPE=
|
FSTYPE=
|
||||||
# Interface to get the IP address from
|
# 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: //"
|
cat /proc/cpuinfo | grep "model name" | head -n 1 | sed -r "s/model name\s: //"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ponyget_Threads()
|
||||||
|
{
|
||||||
|
nproc --all
|
||||||
|
}
|
||||||
|
|
||||||
function ponyget_CPU_Usage()
|
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)"
|
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