I recommend combining the previous answers watch -n 5 free -m. Note that Linux likes to use any extra memory to cache hard drive blocks. So you don't want to ...
To sort the programs in top by memory usage, press Shift+m while running top. This will allow you to see which processes are hogging the most ...
On Linux, top actually supports focusing on a single process, although it naturally doesn't have a history graph: top -p PID. This is also available on Mac OS X ...
Monitorix. A lightweight open-source utility to monitor the Linux server. Monitorix got in-built HTTP so you can check the utilization and other stuff ...
This is not a full answer, but may give you a direction to start looking. This is a RAM forensics framework that may give you some tools to track.
Walks through how to use Monitoring Scripts to produce and consume custom metrics for your Amazon EC2 Linux instance.
5 commands to check memory usage on Linux
Memory (RAM) usage monitoring on Linux
cat Command to Show Linux Memory Information. Entering cat
Often it's necessary to trace memory usage of the system in order to