Questions tagged [jmx]

Java Management eXtensions is a standard Java API that enables the instrumentation and monitoring of a running Java program.

jmx
Filter by
Sorted by
Tagged with
256 votes
12 answers
358k views

How to activate JMX on my JVM for access with jconsole?

How to activate JMX on a JVM for access with jconsole?
Mauli's user avatar
  • 17k
136 votes
12 answers
132k views

How do you Force Garbage Collection from the Shell?

So I am looking at a heap with jmap on a remote box and I want to force garbage collection on it. How do you do this without popping into jvisualvm or jconsole and friends? I know you shouldn't be in ...
eyberg's user avatar
  • 3,210
130 votes
20 answers
168k views

Has anyone ever got a remote JMX JConsole to work?

It seems that I've never got this to work in the past. Currently, I KNOW it doesn't work. But we start up our Java process: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6002 -...
Will Hartung's user avatar
112 votes
10 answers
158k views

Calling JMX MBean method from a shell script

Are there any libraries that would allow me to call a JMX MBean method from a shell script. We expose some operations/admin commands through JMX, and we could have our admins use JConsole, or VisualVM,...
Dougnukem's user avatar
  • 14.8k
109 votes
7 answers
53k views

How do I attach VisualVM to a simple Java process running in a Docker container

Actually I wanted a solution working for JEE containers, specifically for Glassfish, but after I tried many combinations of settings and did not succeed, I reduced the setup to the simplest possible ...
nolexa's user avatar
  • 2,452
108 votes
12 answers
231k views

Remote JMX connection

I'm trying to open a JMX connection to java application running on a remote machine. The application JVM is configured with the following options: com.sun.management.jmxremote com.sun.management....
tuler's user avatar
  • 3,379
90 votes
3 answers
77k views

Explain JMX URL

I am trying to understand a JMX service URL. service:jmx:rmi://192.168.30.10:1234/jndi/rmi://192.168.30.10:2344/jmxrmi It would be great, if someone can help me understand this. Thanks
priyank's user avatar
  • 4,674
72 votes
4 answers
59k views

Why Java opens 3 ports when JMX is configured?

I run my Java program with JDK7 on Centos6. I enable JMX using the following options: JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9123 -Dcom.sun....
Michael's user avatar
  • 10.2k
71 votes
4 answers
67k views

JConsole over ssh local port forwarding

I'd like to be able to remotely connect to a Java service that has JMX exposed, however it is blocked by a firewall. I have tried to use ssh local port forwarding, however the connection fails. ...
blockcipher's user avatar
  • 2,154
66 votes
11 answers
106k views

Unable to remotely connect to JMX?

For some weird reason I am not able to connect using VisualVM or jconsole to a JMX. The parameters used to start the VM to be monitored: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote....
sorin's user avatar
  • 166k
60 votes
1 answer
226k views

How to find the default JMX port number?

I am running a Java application on Java 6 VM on a remote Windows XP, on which I can run jvisualvm.exe to connect to the running application automatically. Now I need to connect that application from ...
chance's user avatar
  • 6,427
56 votes
12 answers
88k views

Connecting remote tomcat JMX instance using jConsole

I am trying to connect to a remote tomcat JMX instance using jConsole. But can't connect successfully. Any Idea? I included the following option in remote tomcat catalina.sh: JAVA_OPTS="$JAVA_OPTS -...
Niger's user avatar
  • 3,986
54 votes
4 answers
19k views

Difference between MBean and MXBean

I have the following questions regarding MBean and MXBean: What is the difference between MBean and MXBean? What are the use cases for MBean and MXBean?
Denim Datta's user avatar
  • 3,776
51 votes
7 answers
54k views

How to access JMX interface in docker from outside?

I am trying to remotely monitor a JVM running in docker. The configuration looks like this: machine 1: runs a JVM (in my case, running kafka) in docker on an ubuntu machine; the IP of this machine ...
Eric Broda's user avatar
  • 6,941
50 votes
6 answers
118k views

What is the best or most commonly used JMX Console / Client [closed]

I have a server application that has been instrumented using JMX so that it can be monitored in test and production environments. I wish to show the current value of some JMX exposed attributes as ...
Keith Lyall's user avatar
  • 1,165
45 votes
5 answers
73k views

How to connect to a java program on localhost jvm using JMX?

I should connect to a java program on localhost jvm using JMX. In other words I want to develop a JMX client to config a java program on localhost. Don't recommend using JConsole! JConsole is not ...
mjafari's user avatar
  • 692
44 votes
4 answers
68k views

jmeter pass command line variables into a jmx

I'm trying to automate some perf testing. I'd to pass server locations into a generic jmx from a Jenkins job. I'd like to be able to do something like: jmeter -n -t foo.jmx -JtestingIP=IP and ...
GeorgeFabian's user avatar
42 votes
2 answers
62k views

JMX password read access issue

When I try to use JMX to monitor an application like this: java -Dcom.sun.management.jmxremote.port=9999 \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote....
Black Magic's user avatar
  • 2,736
41 votes
4 answers
84k views

How to access Spring-boot JMX remotely

I know that spring automatically expose JMX beans. I was able to access it locally using VisualVM. However on prod how I can connect to remotely to the app using it's JMX beans? Is there a default ...
rayman's user avatar
  • 21.1k
39 votes
3 answers
19k views

other open source alternatives to codahale's "metrics"? [closed]

I came across the metrics project from codahale, and I believe that it is used at Yammer. I like this solution, but want to know if there are other open source alternatives with similar capabilities.
user2145809's user avatar
34 votes
5 answers
23k views

How to connect to Java instances running on EC2 using JMX

We are having problem connecting to our Java applications running in Amazon's EC2 cluster. We definitely have allowed both the "JMX port" (which is usually the RMI registry port) and the server port (...
Gray's user avatar
  • 116k
34 votes
1 answer
3k views

MBean persistence

I have a problem with persistence of my config MBean. My configuration: <bean id="adminMBean" class="pl.mobileexperts.catchme.mbeans.AdminSettingsMBean"></bean> <bean id="exporter" ...
Jakub C's user avatar
  • 605
32 votes
11 answers
80k views

How to enable remote JMX on Kafka brokers (for JmxTool)?

I enabled JMX on Kafka brokers by adding KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management....
sui's user avatar
  • 353
32 votes
6 answers
6k views

JMX Defined [closed]

I am looking for: What JMX is. Where I can find some good JMX Tutorials. What JMX can provide to me as a Java EE programmer. Anything else I should be aware of.
mainstringargs's user avatar
32 votes
5 answers
10k views

What do you monitor with JMX in your production Java application?

This question is not about how JMX works or what JMX does. This question is about applications of JMX in a standard application server environment in production. It is not for specific server either. ...
topchef's user avatar
  • 19.4k
30 votes
12 answers
93k views

How do you enable JMX in Websphere?

I would like to use JConsole to monitor my Websphere application, but I am not sure how to enable JMX.
user avatar
29 votes
7 answers
92k views

Does Java 6 open a default port for JMX remote connections?

My specific question has to do with JMX as used in JDK 1.6: if I am running a Java process using JRE 1.6 with com.sun.management.jmxremote in the command line, does Java pick a default port for ...
Bob Cross's user avatar
  • 22.2k
29 votes
3 answers
70k views

Remote monitoring with visualvm and JMX

I would like to monitor a remotely running java (spring boot) application with jvisualvm (or jconsole). When running locally, I can see the managed beans in both jvisualvm and jconsole. When running ...
user152468's user avatar
  • 3,212
29 votes
2 answers
15k views

Does enabling JMX agent have a performance overhead?

I would like to have a possibility to use jconsole in production, but am a bit concerned about performance. Is it ok to leave JMX agent running (via -Dcom.sun.management.jmxremote) or will it have a ...
azerole's user avatar
  • 1,272
28 votes
2 answers
60k views

How to get percentage of CPU usage of OS from java

I want to calculate percentage of CPU usage of OS from java code. There are several ways to find it by unix command [e.g. using mpstat, /proc/stat etc...] and use it from Runtime.getRuntime().exec ...
G.S's user avatar
  • 10.6k
27 votes
9 answers
66k views

Debugging JConsole Connection Failed

I have a web application deployed to a remote resin server, and it has JMX turned on. I can telnet to the remote server i.e franz@see:/tmp$ telnet <remote-ip> 5555 Trying <remote-ip>... ...
Franz See's user avatar
  • 3,312
26 votes
4 answers
95k views

How to find the JMX port in a server?

I am sure I can figure it out if I can see the JAVA OPTS parameters. I want to monitor a hornetq server using Jconsole, so I need the port number. I remember using some command like java grep etc ...
user avatar
26 votes
5 answers
17k views

Is a good idea to enable jmx (lambda probe) on a production server?

We are experiencing some slowdowns on our web-app deployed on a Tomcat 5.5.17 running on a Sun VM 1.5.0_06-b05 and our hosting company doesn't gives enough data to find the problem. We are ...
26 votes
4 answers
31k views

Measuring Java execution time, memory usage and CPU load for a code segment

For a particular segment of Java code, I'd like to measure: Execution time (most likely thread execution time) Memory usage CPU load (specifically attributable to the code segment) I'm a relative ...
Jon Cram's user avatar
  • 17k
24 votes
5 answers
40k views

Not able to Connect a Remote Host to the VisualVM

I am new to Java and I'm facing a problem in connecting a Remote Host to the JVisualVM. I've searched the Internet and followed all the steps mentioned there but still am not able to resolve the ...
rushi's user avatar
  • 545
24 votes
7 answers
26k views

How to have JMX bind to a specific interface?

I am currently starting my Java VM with the com.sun.management.jmxremote.* properties so that I can connect to it via JConsole for management and monitoring. Unfortunately, it listens on all ...
Marc Novakowski's user avatar
23 votes
3 answers
7k views

Bypassing JConsole requirement for username/password - when using a Jaas custom login module with JMX to handle authorization and authentication

I'm using JConsole to access an MBean that is running. The MBean uses a custom Jaas login module and is run with the following command: java -classpath UserLGUGroupHandlingApplication.jar;...
Loco234's user avatar
  • 521
22 votes
5 answers
44k views

List of JMX objects and attributes?

I am trying to implement a nagios plugin, and doing so requires that I know specifically what object and attribute I want to monitor. The thing is, I haven't been able to find a listing anywhere of ...
Matthew's user avatar
  • 512
22 votes
3 answers
28k views

Difference between JMX and RMI

What is the purpose of JMX and what is it used for? I have been scanning through some of the tutorials on JMX and all they do is register some Mbeans and invoke those Mbeans from jconsole. If that is ...
hnm's user avatar
  • 819
22 votes
1 answer
4k views

How do I give a name to a VisualVM "<Unknown Application>"?

JDK 1.6 comes bundled with a handy tool called VisualVM that lets you inspect and interact with running Java processes. One feature is that it auto-detects running JVMs on the local machine. Most ...
Chris Dolan's user avatar
  • 8,955
22 votes
3 answers
8k views

Have you used Perf4J to collect and analyze performance metrics in Java app? [closed]

Did you use Perf4J in your Java application to collect and analyze performance stats? What was the typical pattern (using log files, utilities, UI, JMX, etc.)? Did you use annotations and AOP-...
topchef's user avatar
  • 19.4k
22 votes
2 answers
4k views

Meaning of Spring @ManagerResource: persistPolicy, persistPeriod, persistLocation and currencyTimeLimit

What does the following fields mean in Spring @ManagedResource used for JMX? There is no Javadoc or related description in Spring documentation. 1. String persistPolicy() default ""; 2. int ...
Mohsen's user avatar
  • 3,522
21 votes
4 answers
45k views

JBoss AS 7 JMX Console

I spent some time checking out JBoss AS7 today. I am impressed with what I have seen so far but I noticed that good ol' JMX-Console no longer exist. Does anyone know why it was left out? I ...
helios's user avatar
  • 2,683
21 votes
6 answers
31k views

Unable to use JConsole with Tomcat running as windows service

I am running tomcat 6.0.18 as a windows service. In the service applet the jvm is configured default, i.e. it is using jvm.dll of the JRE. I am trying to monitor this application with JConsole but ...
Kees de Kooter's user avatar
20 votes
5 answers
15k views

Is there any JMX - REST bridge available?

Hi I would like to monitor a Java application using the browser but at the same time utilising the existing JMX infrastructure. I know that JMX provides a HTTP interface but I think it provides a ...
20 votes
4 answers
45k views

How do I access memory usage programmatically via JMX?

I'm looking for sample Java JMX code to access the values of JMX attributes from another VM. With JConsole, I have no problem looking at java.lang/Memory/Attributes/HeapMemory How would I get the ...
ThoughtfulHacking's user avatar
19 votes
4 answers
37k views

Disabling JMX in a spring application

I'm trying to disable jmx so that i don't get: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mbeanExporter'anymore. I've found a partial answer saying that ...
OntZ's user avatar
  • 263
19 votes
4 answers
19k views

Failed to Unregister DataSource JMX MBean While Shutting Down a Spring Boot Application

I have a simple Spring Boot application using org.apache.commons.dbcp2.BasicDataSource as dataSource bean. The data source is exposed as MBean automatically by Spring boot. The bean declaration: @...
jlai's user avatar
  • 949
18 votes
4 answers
40k views

Package accessible from more than one module: <unnamed>

When trying to register an MBean in JMX Console I'm getting the following error message: The package javax.management is accessible from more than one module: <unnamed>, java.management I'm ...
Evandro Pomatti's user avatar
17 votes
5 answers
34k views

JMX agent throws java.net.MalformedURLException when host name is set to all numeric value

We are using tomcat 7.0.27 in our application. We are below setting jmx properties on tomcat startup. -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8666 -Dcom.sun.management....
user3012665's user avatar

1
2 3 4 5
49