[why] it can not compute vm memory when vm memory less than 16G.
Signed-off-by: Wei Jihui weijihuiall@163.com --- tests/host-info | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/host-info b/tests/host-info index fe55d1ff..2721648c 100755 --- a/tests/host-info +++ b/tests/host-info @@ -4,8 +4,8 @@ get_memory() { memory_total=$(cat /proc/meminfo |grep MemTotal | awk '{print $2}') - memory_new=$(awk 'BEGIN{printf "%0.2f", '$memory_total'/1024/1024/16}') - memory=$(echo `expr $(echo $memory_new | awk '{print int($0)+1}') * 16`)G + memory_new=$(awk 'BEGIN{printf "%0.2f", '$memory_total'/1024/1024}') + memory=$(echo $memory_new | awk '{print int($0)+1}')G echo "memory: $memory" }