I think I may have a memory leak in my LAMP application (memory gets used up, swap starts getting used, etc.). If I could see how much memory the various processes are using
The tool you want is ps. To get information about what java programs are doing:
ps -F -C java
To get information about http:
ps -F -C httpd
If your program is ending before you get a chance to run these, open another terminal and run:
while true; do ps -F -C myCoolCode ; sleep 0.5s ; done