New answers tagged memory-usage
Have you tried Glances ? Refer this link, it has some thing in common. System Monitoring Tools For Ubuntu Best of luck !!
top has a batch mode (-b) that generates output without the screen control codes. By adding some other switches and options, you may be able to focus in on the stats you need and redirect it to a file or other program for processing.
Sysstat is your friend, assuming you are fine with using the command line. Have a look for examples here for memory usage, and here for cpu usage.
Top 50 recent answers are included