I have a client
which is Multithreaded
code and which is hitting one of my REST service
which is being deployed to this machine-
http://px5qa01c-8539.host.com:8080/service/TEService/v1/get/USERID=100/PURCHASED
I have remote access to the above machine and it's a Linux host.
Now I am planning to do profiling
on the Server Side
on my REST Service
meaning I need to see which methods is taking how much time on my REST Service.
On the client side I am running program like this- which will hit my REST Service
that I have deployed on the above machine.
java -Xrunhprof:cpu=samples,thread=y,depth=12,cutoff=0 -jar ServiceLnP.jar service_config.properties NUMBER_OF_THREADS:20 TOTAL_RUNNING_TIME:60
So on the client side, it will generate java.hprof.txt
file which I can open with HP Jmeter and analyze it.
Problem Statement:-
But on the server side what should I do? What's the best way to profile the applications that has been deployed on some other machine.
Just FYI- The container on which it is deployed is Geronimo. So is there any way, I can enable hprof
on the server as well and as soon as I am hitting my REST Service after it finishes, it will generate java.hprof.txt
that I can analyze further?