So in another thread I posted someone suggested I monitor the heap space usage using jstat, which lead me to jconsole which does something similar, but is more of a GUI.
The problem I'm having with both of these is that the process I'm running with java is a short lived program that reads data from one file, does something with that data, and then creates a new file.
This program lasts somewhere between 30 and 120 seconds or so. And the problem I'm finding with using jstat/jconsole is they require you to input not a program to monitor, but a process's PPID. In order to get the PPID of a process you can use jps (or check in your task manager if you're using windows).
So, if I start the program running using JCreator for example, then in a command prompt type jps to get the PPID, by the time I start jstat or jconsole, most of the program is finished.
Is there a way around this? Is there a way to start a java program with a parameter that will tell jstat or jconsole to provide you with information on this process/program from when it starts to when it ends? Otherwise, I think I wouldn't get all the information I need.
If this is something very obvious that I should have understand from the instruction pages provided by java's site, I apologize. In my eyes, it isn't explained very well to someone without a thorough understanding of the terminology. And I haven't found a way around this. But I have tried to read up information on the subject.
I appreciate your help and knowledge, thank you.
-blazed