rmarchei / jmxsh Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jmxsh
License: Apache License 2.0
Automatically exported from code.google.com/p/jmxsh
License: Apache License 2.0
The -T/--url_path option used to specify the path portion of the jmx service
url is ineffective, default value of jmxrmi cannot be overridden.
This issue is due to a mismatch between the key name used for this option at
definition time (using "url_path") and at retrieval time (using "path").
Patch attached.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2010 at 3:44
Attachments:
What steps will reproduce the problem?
1. expose a command who takes an integer paramete [ ie: foo(int arg0) ]
2. call [jmx_invoke -m foo.bar:name=Bam foo -1]
What is the expected output? What do you see instead?
expected: successful update of the mbean
actual: Error: Could not find operation -1
What version of the product are you using? On what operating system?
jmxsh-R5, osx 10.7.5
Please provide any additional information below.
passing in 0 or positive values works as expected. the jmx command is an
operation, not an attribute.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2013 at 11:11
Hi,
can we get some documentation for this project?
I'm interested in finding out how to run this as a scriptable executable.
Thanks.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2008 at 7:40
This project doesn't have enough document
Original issue reported on code.google.com by [email protected]
on 24 Apr 2015 at 4:29
What steps will reproduce the problem?
1. jmx_invoke -m ContentApplicationEngine:type=Cache evict
What is the expected output? What do you see instead?
There are two methods with name evict:
1)void evict(String p0)
2) void evict()
Only the first method is recognized.
What version of the product are you using? On what operating system?
Java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Server VM (build 20.5-b03, mixed mode)
Linux 3.2.0-24-generic-pae #39-Ubuntu SMP Mon May 21 18:54:21 UTC 2012 i686
i686 i386 GNU/Linux
Please provide any additional information below.
In method MBeanOperationInfo getOperationInfo(String server, String mbean,
String opname) only the first occurrence is found.
Original issue reported on code.google.com by [email protected]
on 20 Jun 2012 at 11:10
I'm able to list mbeans in various domains and I'm able to get values of
specific mbean attributes, but I'm unable to list all attributes of a given
mbean. Is this not supported or is there hidden syntax to do it?
Original issue reported on code.google.com by [email protected]
on 18 Oct 2012 at 7:49
Is it possible to connect to a JVM process without any TCP port like JConsole
can do ?
Original issue reported on code.google.com by [email protected]
on 17 Jun 2010 at 8:43
I'm writing a Ganglia gmond python module that uses jmxsh. It was not efficient
to constantly be writing out to a script file in order to execute commands.
This will enable reading from standard input and returning the results of the
commands only.
http://code.google.com/p/gmond-python-modules
Here is the module that uses jmxsh:
http://code.google.com/p/gmond-python-modules/source/browse/trunk/jmxsh.py
Index: src/jmxsh/JInterp.java
===================================================================
--- src/jmxsh/JInterp.java (revision 25)
+++ src/jmxsh/JInterp.java (working copy)
@@ -24,6 +24,8 @@
import org.apache.log4j.*;
import tcl.lang.*;
+import java.io.InputStreamReader;
+import java.io.BufferedReader;
class JInterp extends Interp {
@@ -111,6 +113,21 @@
}
}
+ static void evaluateStdin() {
+ try {
+ BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
+ String strLine;
+ while ((strLine = br.readLine()) != null) {
+ //System.out.println(strLine);
+ instance.eval(strLine);
+ }
+ }
+ catch (Exception e) {
+ logger.error("Tcl error while evaluating stdin.", e);
+ throw new IllegalArgumentException("Error processing stdin" +
instance.getResult().toString());
+ }
+ }
+
static void processTclEvents() {
try {
Notifier.processTclEvents(instance.getNotifier());
Index: src/jmxsh/Main.java
===================================================================
--- src/jmxsh/Main.java (revision 25)
+++ src/jmxsh/Main.java (working copy)
@@ -153,6 +153,13 @@
.hasArg(false)
.create("I")
);
+
+ opts.addOption(
+ OptionBuilder.withLongOpt("quiet")
+ .withDescription("Quiet mode. Do not go into interactive
mode.")
+ .hasArg(false)
+ .create("q")
+ );
opts.addOption(
OptionBuilder.withLongOpt("browse")
@@ -343,10 +350,24 @@
}
}
- // 5b. Otherwise, start interactive session.
- interactive = true;
- historyEnabled = true;
+ // Run stdinput commands
+ if (commandLine.hasOption("quiet")) {
+
+ JInterp.setGlobal("argv", scriptArgs, 1);
+ JInterp.setGlobal("argc", scriptArgs.length-1);
+
+ JInterp.evaluateStdin();
+
+ System.exit(0);
+ } else {
+
+ // 5b. Otherwise, start interactive session
+
+ interactive = true;
+ historyEnabled = true;
+ }
+
if (commandLine.hasOption("nohistory")) {
historyEnabled = false;
}
@@ -438,7 +459,7 @@
System.err.println("Exception caught: " + e.getMessage());
}
}
- }
+ }
}
Original issue reported on code.google.com by [email protected]
on 30 Jul 2010 at 8:25
What steps will reproduce the problem?
1. download the jar and jmxsh script
2. setup java home
3. run ./jmxsh
What is the expected output? What do you see instead?
I expected to run the jar file..But i got below exception
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version
number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:693)
at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:599)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at com.simontuffs.onejar.Boot.run(Boot.java:300)
at com.simontuffs.onejar.Boot.main(Boot.java:159)
What version of the product are you using? On what operating system?
Latest version specified here
Please provide any additional information below.
Running on java version "1.5.0_24"
Original issue reported on code.google.com by [email protected]
on 31 Jan 2012 at 12:03
What steps will reproduce the problem?
1. connect to a Tomcat 7 instance:
% jmx_connect -h localhost -p 1234
2. query a mbean ending with a quote:
% jmx_get -m Catalina:type=ThreadPool,name="ajp-bio-8009" currentThreadsBusy
Error: Cannot convert result to a string.
Cannot convert result to a string.
Debug output is:
105151 [ConsoleThread] DEBUG jmxsh.ShellMode - jmx_get -m
Catalina:type=ThreadPool,name="ajp-bio-8009" currentThreadsBusy
105165 [main] DEBUG jmxsh.Jmx - Getting attribute for server -
service:jmx:rmi:///jndi/rmi://localhost:1234/jmxrmi, mbean - Catal
ina:type=ThreadPool,name="ajp-bio-8009, attribute - currentThreadsBusy
105167 [main] ERROR jmxsh.Jmx - Error while getting attribute.
java.lang.IllegalArgumentException: Invalid object name
'Catalina:type=ThreadPool,name="ajp-bio-8009' - Unterminated quoted value
at jmxsh.Jmx.getObjectName(Jmx.java:198)
at jmxsh.Jmx.getAttribute(Jmx.java:265)
at jmxsh.GetCmd.cmdProc(GetCmd.java:164)
at tcl.lang.Parser.evalObjv(Parser.java:826)
at tcl.lang.Parser.eval2(Parser.java:1228)
at tcl.lang.Interp.eval(Interp.java:2679)
at tcl.lang.Interp.eval(Interp.java:2747)
at tcl.lang.Interp.recordAndEval(Interp.java:2900)
at jmxsh.ShellMode$1.processEvent(ShellMode.java:79)
at tcl.lang.Notifier.serviceEvent(Notifier.java:457)
at tcl.lang.Notifier.doOneEvent(Notifier.java:610)
at tcl.lang.Notifier.processTclEvents(Notifier.java:786)
at jmxsh.JInterp.processTclEvents(JInterp.java:116)
at jmxsh.Main.run(Main.java:358)
at jmxsh.Main.main(Main.java:262)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.simontuffs.onejar.Boot.run(Boot.java:306)
at com.simontuffs.onejar.Boot.main(Boot.java:159)
What version of the product are you using? On what operating system?
jmxsh-R5.jar
SPARC Solaris 10
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Server VM (build 20.2-b06, mixed mode)
This will work around the problem (two terminating quotes):
% jmx_get -m Catalina:type=ThreadPool,name="ajp-bio-8009"" currentThreadsBusy
4
...or this (change the order of the key/value pairs):
% jmx_get -m Catalina:name="ajp-bio-8009",type=ThreadPool currentThreadsBusy
4
Browse Mode works just fine for these mbeans.
Original issue reported on code.google.com by [email protected]
on 14 Sep 2011 at 2:24
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.