I have a Java program I am running on a server and I need to profile
it, how can I best do this taking into account:
I must run the program on the server which is using linux.
I can only connect to the server (using ssh) by first connecting to an
intermediate server and then connecting to the server I need from
this. So I can't directly connect to the server from my local machine.
(My-Local-Machine)<-ssh->(Intermediate Server)<-ssh->(Server I need)
Since I am using ssh I only have the commandline so won't be able to
use programs which require a GUI.
I don't want to do anything complicated, Just find out the memory
usage and where (what methods) the program is spending it's time in.
Is there some program I could use to profile my program remotely on
this linux server that would dump the output into a file which I could
then visualise with some other application on my host machine (which
is using Windows).
Any ideas,suggestions, help, greatly apperciated.
regards,
pat
Byron Miller - 18 Jul 2004 19:50 GMT
I'm not sure for anything less than jdk 1.5 out of the box, however i do
what your looking to do by using JDK 5 and JMX. I found a nice JMX
"dashboard" for NetBeans IDE that is freely available - there is a
commercial one for Eclipse as well.
http://mc4j.sourceforge.net/
-byron
>I have a Java program I am running on a server and I need to profile
> it, how can I best do this taking into account:
[quoted text clipped - 8 lines]
> Since I am using ssh I only have the commandline so won't be able to
> use programs which require a GUI.
Usman Saleem - 19 Jul 2004 09:45 GMT
Checkout BEA Weblogic JRockit(TM) JVM. It provides excellent profiling
out of the box (client/server based)
Regards,
Usman
> I have a Java program I am running on a server and I need to profile
> it, how can I best do this taking into account:
[quoted text clipped - 22 lines]
>
> pat
Nigel Wade - 19 Jul 2004 12:56 GMT
> I have a Java program I am running on a server and I need to profile
> it, how can I best do this taking into account:
[quoted text clipped - 22 lines]
>
> pat
The JVM profiler info is text based. Look at the java man page and options
-Xprof, -Xrunprof.
I've never actually managed to make much sense of the output myself.

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555