How to display the real-time memory usage in Linux

Often times, we need to monitor our Linux server memory usage, “watch” is a handy command to display the real-time memory usage in Linux.

NAME
watch – execute a program periodically, showing output fullscreen

We can issue the following command to keep track the real time memory usage in Linux.

watch -d free -m

The memory usage will update every 2 seconds, and the different will be highlighted.

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

2 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Webom
8 years ago

Hi,
Please also tell how to come out of this command 🙂
Regards.

john
8 years ago
Reply to  Webom

Ctrl+C to exit