mlaguren
mlaguren

Reputation: 3

Profile performance of JMeter when running running as a remote server

When running JMeter on my desktop, I can use VisualVM to monitor the characteristics of JMeter as I perform load tests.

JMeter VisualVM enter image description here

However, when I set up JMeter on a remote server and have jstatd running, I do not see my application under that server. I can see jstatd running, with the following command:

root@jmeter:~# netstat -nlp | grep jstatd
tcp6       0      0 :::39337                :::*                    LISTEN      8410/jstatd     
tcp6       0      0 :::1099                 :::*                    LISTEN      8410/jstatd  

Has anyone been successful in getting this set up? I can blindly increase the JVM properties, but I would like to see how my jmeter tests perform.

Upvotes: 0

Views: 1408

Answers (2)

Naveen Kumar R B
Naveen Kumar R B

Reputation: 6398

Try the steps mentioned here, using jstatd:

Remote Monitoring VisualVM using jstatd

As an alternative, you can try with JMX:

enable remote monitoring using JMX

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168122

From jstatd description

Monitors Java Virtual Machines (JVMs) and enables remote monitoring tools to attach to JVMs. This command is experimental and unsupported.

I would suggest switching to the same "jvisualvm" approach, but connecting to JMeter instance remotely, not locally, as per Monitoring and Management Using JMX Technology guide.

  1. Add the following lines to system.properties file (lives in JMeter's "bin" folder)

    java.rmi.server.hostname=remote_machine_IP_here   
    com.sun.management.jmxremote.host=remote_machine_IP_here
    com.sun.management.jmxremote.port=remote_machine_PORT_here
    com.sun.management.jmxremote.rmi.portremote_machine_PORT_here
    com.sun.management.jmxremote.authenticate=false
    com.sun.management.jmxremote.local.only=false
    com.sun.management.jmxremote.ssl=false
    
  2. Restart JMeter to pick the properties up. (Alternative way of setting Java System properties is passing them via -D arguments to JMeter startup script like:

    jmeter -Djava.rmi.server.hostname=10.10.10.10 .....
    
  3. In jvisualvm -> Remote -> Add Remote Host put a connection string like:

    • remote_machine_IP:remote_machine_PORT or
    • service:jmx:rmi:///jndi/rmi://remote_machine_IP:remote_machine_PORT/jmxrmi

Alternatively you can use PerfMon plugin which collects a way more detailed statistics and able to plot it via the relevant JMeter Listener. See How to Monitor Your Server Health & Performance During a JMeter Load Test guide for more details on setting up and using PerfMon with JMeter.

Upvotes: 1

Related Questions