Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Remote Profiling with sudo

Moderators: Vladimir Kondratyev, Anton Katilin

Remote Profiling with sudo

Postby miwoe » Sat Aug 05, 2017 10:23 am

Hi,

my primary aim is to use a profile for production environments to allow to connect to the withouth doing some additional configuration.

I have seen that the Java Profiler supports ssh. My problem is that our applications are running with an user which can not connect via ssh which is a typically setup, I think.

I have seen that the competitor JProfile support su(do) command, so that you can set up ssh for one account which has su(do) rights to switch to the user which is running the JVMs.

Is that also possible with Java Profile? If not, it is a planned feature?

Best Regards,
Michael
miwoe
 
Posts: 2
Joined: Sat Aug 05, 2017 10:17 am

Re: Remote Profiling with sudo

Postby Anton Katilin » Mon Aug 07, 2017 9:56 am

Hello Michael

I'm not sure I understand particularly which feature you mean. Could you please share a link.

Anyway, it is not required to the user under which you run the profiled JVM process to be able to do anything with SSH.

Instead, all you need is to have a user on the remote machine under which you can connect to that machine from your local machine running the profiler UI via SSH. If you do, you should be able to profile any profiling enabled application on that machine.

Please follow these instructions:
https://www.yourkit.com/docs/java/help/ ... filing.jsp

Best regards,
Anton
Anton Katilin
 
Posts: 5568
Joined: Wed Aug 11, 2004 8:37 am

Re: Remote Profiling with sudo

Postby miwoe » Mon Aug 07, 2017 8:14 pm

Hi, Anton,

I mean this:
https://www.ej-technologies.com/product ... new10.html
Picture 3

There you can add sudo rights.
Normally, we cannot login directly with the user running the JVM.

However, for test case, I have added /bin/bash for the user in one environment, but still Java Profile is not finding any JVM, although running jps, I get this output:

:/$ jps
1676 Jps
25087 movies.jar

Have seen that I have do attach an agent on the JVM. As it is possible to attach it while running, why is JProfiler not doing it via the ssh account on demand? For doing it, do I have to install JProfile on each individual machine which I want to profile (on demand)?
miwoe
 
Posts: 2
Joined: Sat Aug 05, 2017 10:17 am

Re: Remote Profiling with sudo

Postby Anton Katilin » Tue Aug 08, 2017 7:28 pm

Please read the topic I suggested in my previous post:
https://www.yourkit.com/docs/java/help/ ... filing.jsp

You should enable profiling by either configuring the JVM to run with the agent:
https://www.yourkit.com/docs/java/help/ ... remote.jsp

... or attach the agent to a running JVM:
https://www.yourkit.com/docs/java/help/ ... wizard.jsp
Anton Katilin
 
Posts: 5568
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

cron