Open Mte90 opened 6 years ago
I got Memory 0 with the script but is impossible.
So checking on the code I got:
[domain@machine ~]$ free -m total used free shared buff/cache available Mem: 128817 8881 9009 5416 110926 112742 Swap: 16383 13 16370 [domain@machine ~]$ free -m | awk 'NR==3{print $3}' 13
Seems that take the value from swap on the wrong line
I patched using: local USED_MEM=$( free -m | awk 'NR==2{print $3}' )
local USED_MEM=$( free -m | awk 'NR==2{print $3}' )
I got Memory 0 with the script but is impossible.
So checking on the code I got:
Seems that take the value from swap on the wrong line