I just want to know how to find the memory consumption of a particular process for particular time(say 5 seconds)
I am new to linux. So, detailed steps of doing that wil
use watch to periodically execute your script. here is an example:
watch 'cat /proc/status' --interval=5 watch 'ps aux' --interval=5