diff --git a/README b/README index 871ca2f..e336bc0 100644 --- a/README +++ b/README @@ -43,6 +43,7 @@ Config Variables: Requirements: * lsb-release for Distro * lxc for Containers + * bc for CPU_Usage Generating Images ----------------- diff --git a/systempony b/systempony index 77a4bb1..b435471 100755 --- a/systempony +++ b/systempony @@ -83,7 +83,7 @@ function ponyget_CPU() function ponyget_CPU_Usage() { - echo "$(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)" } function ponyget_Uptime()