Merge branch 'nproc' of evolix/kvm-tools into master
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
abenmiloud 2019-05-27 14:54:22 +02:00 committed by Gitea
commit 55791a8c26

View file

@ -60,7 +60,7 @@ done | (
awk '{ print } /yes$/ { vcpu += $2; ram += $3; disk += $4; running++ } END { print "TOTAL(running)", vcpu, ram, disk, running }'
if [ "$SHOW_AVAIL" ]
then
AV_CPU=$(awk '/^processor/ { cpu++ } END { print cpu }' /proc/cpuinfo)
AV_CPU=$(nproc)
AV_MEM=$(awk '/^MemTotal:/ { print int($2 / '$((POW / 1024))' ) }' /proc/meminfo)
echo AVAILABLE "$AV_CPU" "$AV_MEM"
fi