linux指令--内存相关free命令

时间:2021-08-15 16:55:48

linux141:~ # free --help
free: invalid option -- '-'
usage: free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]
  -b,-k,-m,-g show output in bytes, KB, MB, or GB
  -l show detailed low and high memory statistics
  -o use old format (no -/+buffers/cache line)
  -t display total for RAM + swap
  -s update every [delay] seconds
  -c update [count] times
  -V display version information and exit
可以用该指令进行动态监控:
free -m -s 3 -c 2  表示没3s打印一次,一共打印两次