I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using
runtime.totalMemory - runtime.freeMemory
But that's not cutting it, as it takes into consideration the whole system, not just the process I want to track.
I'm using a shell script to run a scala program which I want to have its memory usage tracked.