Write another shell used to monitor memory usage
CodePudding user response:
While:Do
Phymem=` free | grep "Mem:" | awk '{print $2}' `
Phymemused=` free | grep 'buffers/cache' | awk '{print $3}' `
Awk 'BEGIN {printf "% 2 f % \ n", (' $phymemused'/' $phymem) * 100} '
Sleep 3
Echo $phymem
Echo $phymemused
done