freeMem=`free -g | grep "Mem" | awk '{print $7}'`
if [ $freeMem -lt 100 ]; then
echo "系统可用内存不足, 剩余[$freeMem]GB"
fi
shell(14) : 判断可用内存
最新推荐文章于 2023-09-04 00:07:04 发布
freeMem=`free -g | grep "Mem" | awk '{print $7}'`
if [ $freeMem -lt 100 ]; then
echo "系统可用内存不足, 剩余[$freeMem]GB"
fi