launchers/kvm : manière plus portable de récupérer la mémoire libre
This commit is contained in:
parent
e801093e13
commit
f6da6444f6
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ esac
|
|||
[ -z "$QEMUSH_NPROC" ] && QEMUSH_NPROC=$(($(nproc) / 2))
|
||||
|
||||
# How much RAM to use
|
||||
[ -z "$QEMUSH_RAM" ] && QEMUSH_RAM=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K
|
||||
[ -z "$QEMUSH_RAM" ] && QEMUSH_RAM=$(($(grep '^MemAvailable:\s' /proc/meminfo | awk '{ print $2 }') / 2))K
|
||||
|
||||
# Use selected QEMUSH_MACHINE type if set
|
||||
[ -n "$QEMUSH_MACHINE" ] && set -- -M "$QEMUSH_MACHINE" "$@"
|
||||
|
|
Loading…
Reference in a new issue