15-414 Assignments, Memory Script Information

You can download a script for checking memory usage here. It should work on Linux systems. You use it by running:
memscript [pid of target process] [output file]

It has been installed at /afs/andrew.cmu.edu/usr24/mtschant/15414-f07/memscript on unix.andrew.cmu.edu.

One concern is finding out the pid of the JPF process. If you are running no other Java processes, the following command, should run JPF and pass the pid to to memscript:

/afs/andrew.cmu.edu/usr24/mtschant/15414-f07/jpf-release/bin/jpf Test & /afs/andrew.cmu.edu/usr24/mtschant/15414-f07/memscript `ps -u $USER | grep "java" | sed 's/\(^[^ ]*\) .*/\1/'` mem.out

where Test is the name of the Java .class file you want to test and mem.out is the name of the output file where the memory usage information will be put. The above command should be ran all on one line of your shell even if your browser has put newlines into it. You can get a copy without such newlines here.

You might be able to use memscript on cygwin as well, but you may have to change the "$23" found in it to something else.

Thanks go to Sagar for providing memscript.

Another script for seeing the amount of memory used has been donated by Andrei. You can download it here. Run it to see usage instructions. Thanks, Andrei!