jmx

How to connect to remote server and start/stop the Tomcat that's running on that particular server using Ant?

天涯浪子 提交于 2019-12-03 17:28:20
The purpose is to: 1: connect to a remote server maybe via host: ip , port: 8181 2: stop Tomcat that's running on that server 3: deploy a .war file 4: restart tomcat I believe Tomcat Documentation under Monitoring and Managing Tomcat offers some information on how to stop a given application, but not the server entirely: <jmx:invoke name="Catalina:type=Manager,path=/servlets-examples,host=localhost" operation="stop"/> If you have ssh access to the server, then you might like to consider the JSch library which you can use in combination with SSHExec Ant Task to start and stop your server:

Java MXBean custom types

一个人想着一个人 提交于 2019-12-03 17:15:24
I am trying to create an MXBean with a custom attribute, but I get javax.management.NotCompliantMBeanException IJmsDestinationMBean.getAttributes has parameter or return type that cannot be translated into an open type I have read that MXBean attributes have to be OpenType compatible. How would I make my attribute work this way? All the classes below are in the same package. class JmsDestinationMBean implements IJmsDestinationMBean{ protected JmsDestinationAttributes attributes = new JmsDestinationAttributes(); @Override public JmsDestinationAttributes getAttributes() { return this.attributes;

Better options to view JMX beans other than Jconsole [closed]

六眼飞鱼酱① 提交于 2019-12-03 17:03:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . JConsole has quiet a buggy view to monitor JMX published counters. What are the other alternatives ? I am unable to find any, other than JVisualVM which in effect uses the same view 回答1: Some alternatives are (since I'm fine with JVisulaVM I haven't tried them yet): JRockit Mission Control (will be added as Java

How to monitor JMX metrics of Kafka broker on command line?

我的梦境 提交于 2019-12-03 13:35:43
A Kafka cluster can be monitored in granular detail via the JMX metrics it exposes. Usually an external GUI or application like jconsole needs to be hooked up to a broker's exposed JMX_PORT in order to view these metrics. Is there a way that I can view a broker's JMX metrics in an SSH session, via STDOUT ? Is there a native Kafka command that I can run to view these metrics? Download the jar located here: https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0-alpha-4/ On the machine, then run: wget https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0-alpha-4/ -o jmx.jar

What is the status of JMX 2.0?

北慕城南 提交于 2019-12-03 12:44:10
It was supposed to be released with Java 7, but the status is Dormant . On the other hand, the same page says Use generics in the JMX API, for example have MBeanServer.queryNames return Set<ObjectName> rather than just Set . and this did happen in Java 6 . So, did some of the changes get in? Are there significant differences between Java 6 and Java 7 JMX implementations? Looking at Javadocs, I didn't notice any, but this only covers the API. I asked this question also to the current product manager for JMX at Oracle, Tuva Palm some times ago (September 2011), and she promised me, that JMX 2.0

How to have JMX bind to a specific interface?

我的梦境 提交于 2019-12-03 11:06:36
问题 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 interfaces (IP addresses) on the machine. In our environment, there are often cases where there is more than one Java VM running on a machine at the same time. While it's possible to tell JMX to listen on different TCP ports (using com.sun.management.jmxremote.port ), it would be nice to instead have JMX

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

放肆的年华 提交于 2019-12-03 11:00:54
问题 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 are listed as " (pid xxxx)" but some have a name and an icon, like VisualVM itself and others like NetBeans (see the screenshot in this dzone article for example). How do I inject my application name and icon into the JVM so it shows up properly in VisualVM's application list? Does my app need to be

How to find the JMX port in a server?

一曲冷凌霜 提交于 2019-12-03 10:54:23
问题 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 when I connected to it a while back. 回答1: If you know the process number you can use netstat to find what ports the program is listening on with something like $ netstat -apn | grep <proc num> The conventional port for JMX listeners is 1099. 回答2: I know it's an old post. You can also get the details

Can visualvm connect automatically via JMX to a remote process?

只谈情不闲聊 提交于 2019-12-03 09:28:55
问题 I have a Java process running on a remote machine, and the process sets up some mbeans. I also have jstatd running on that machine as the same user as the Java process. (The mbeans can be set up programmatically or using -Dcom.sun.management.jmxremote... etc, this doesn't appear to make a difference). VisualVM is able to make a jstatd connection to the process, which it discovers automatically, but this means I don't get access to mbeans or, for example, the CPU history chart. Alternatively I

How to encrypt passwords for JConsole's password file

荒凉一梦 提交于 2019-12-03 08:51:29
问题 I am using the JConsole to access my application MBeans and i use the the password.properties file. But as per the Sun's specification this file contains passwords in clear text formats only. com.sun.management.jmxremote.password.file=<someLocation>/password.properties Now i would want to encrypt the password and use it for the JMX user authentication from JConsole (the username and password fields in Remote section). I could use any pre-defined encryption logic or my own encryption