Use free with '-s' option to get a continuous update of memory usage info
Free command gives a concise information of the memory usage of the system. The program displays the info once and exits. You can use the ‘-s’ option to update the output continuously. Unlike top command, free doesn’t use ncurses, hence instead of a page refresh emulation its simply continuous printing. But it sure does the job.
Along with the ‘-s’ option you need to specify the result delay duration in seconds; decimal works too.
[shredder12]$ free -s 3
total used free shared buffers cached
Mem: 2516 1322 1194 0 69 506
-/+ buffers/cache: 746 1770
Swap: 1906 0 1906
total used free shared buffers cached
Mem: 2516 1332 1184 0 69 506
-/+ buffers/cache: 751 1765
Swap: 1906 0 1906total used free shared buffers cached
Mem: 2516 1320 1196 0 69 506
-/+ buffers/cache: 744 1772
Swap: 1906 0 1906



























2 Comments
That's a brilliant method! thanks :)
Post new comment