Linux command to show memory in use EC2 Amazon Linux AMI

September 12, 2012

Sometimes you may wish to see how much memory your application is eating up on your amazon ec2 instance (or indeed any other linux box) you can do this by running the command below, at terminal (over SSH).

free -m

You'll get something like this pop up.

root@ip-101-101-101-101 ec2-user]# free -m
             total       used       free     shared    buffers     cached
Mem:           594        565         28          0          3         73
-/+ buffers/cache:        489        105
Swap:            0          0          0

The important part is the second line which will give you the total free memory after everything else.


About me

Hello! I'm David Heward, how are you going? I'm a Senior Devops/Build Engineer, specialising in AWS & Cloud Automation. Based in London. Strong 10+ year background in Software development. Have a read of my blog. Have a look at some of my working projects. Contact me at @davehewy or on Linkedin.