To find out the process with largest memory consumption is
#ps aux | grep sort -n -k4
Note down the pid of the bottmost process which takes the highest memory then
#ps ev –pid=2485
Now repeatedly note down the values under RSS.
Note: In the above output, if RSS (resident set size, in KB) increases over time (so would %MEM), it may indicate a memory leak in the application.