From ec86251fd38b8fdaa16cf8488174eabe7e8bc53d Mon Sep 17 00:00:00 2001 From: xiaoz Date: Tue, 22 Dec 2020 16:29:05 +0800 Subject: [PATCH] fix bug --- set_swap.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/set_swap.sh b/set_swap.sh index a19f027..a4d0cb4 100644 --- a/set_swap.sh +++ b/set_swap.sh @@ -4,6 +4,10 @@ ##### author:xiaoz #获取物理内存 +declare -i p_mem +declare -i get_swap +declare -i swap_value + p_mem=`free -m|grep Mem|awk '{print $2}'` #获取虚拟内存大小 get_swap=`free -mt|grep 'Swap'|awk '{print $2}'`