free -g -s 2 | grep Mem
-g G位单位
2 每2s采集一次
free(查看内存)
原文:http://www.cnblogs.com/Bingo0-python/p/6891978.html