Code Monkey home page Code Monkey logo

cjmx's Introduction

cjmx

cjmx is a command line JMX client intended to be used when graphical tools (e.g., JConsole, VisualVM) are unavailable. Additionally, cjmx intends to be useful in scripting environments.

Getting cjmx

cjmx is available on Maven Central using groupId com.github.cjmx and artifactId cjmx_3. An executable JAR is published using the app classifier.

Note: Both a regular and an application JAR (with embedded dependencies and minimized) are published on Maven Central.

Building

To build, run sbt publishLocal. This will build target/scala-3.3.0/proguard/cjmx_3-3.3.0-SNAPSHOT.jar and install a copy to your local ivy cache. Note this requires sbt to be installed first.

Usage

Launching cjmx is done via, using Java 9+:

java -cp target/scala-3.3.0/proguard/cjmx_*.jar cjmx.Main [PID]

If a PID is specified on the command line, cjmx will attempt to connect to the local JVM with that PID; otherwise, cjmx starts in a disconnected state.

Once cjmx starts, a prompt will appear. cjmx makes heavy use of tab completion, enabling exploration of the MBean tree. For example:

java -jar path/to/cjmx.jar 1234
> <TAB>
disconnect   exit         describe      names        select
> names 'java.<TAB>
java.lang:           java.util.logging:
> describe -d 'java.lang:type=
*                  <value>            ClassLoading       Compilation
GarbageCollector   Memory             MemoryManager      MemoryPool
OperatingSystem    Runtime            Threading
> names 'java.lang:type=*'
java.lang:type=ClassLoading
java.lang:type=Compilation
java.lang:type=Memory
java.lang:type=OperatingSystem
java.lang:type=Runtime
java.lang:type=Threading
> describe -d 'java.lang:type=Memory'
Object name: java.lang:type=Memory
----------------------------------
Description: Information on the management interface of the MBean

Attributes:
  Verbose: boolean
    Description: Verbose
  ObjectPendingFinalizationCount: int
    Description: ObjectPendingFinalizationCount
  HeapMemoryUsage: CompositeData
    Description: HeapMemoryUsage
  NonHeapMemoryUsage: CompositeData
    Description: NonHeapMemoryUsage

Operations:
  gc(): void
    Description: gc

Notifications:
  javax.management.Notification
    Description: MEMORY NOTIFICATION
    Notification types:
      java.management.memory.threshold.exceeded
      java.management.memory.collection.threshold.exceeded

> mbeans 'java.lang:type=Memory' select *
java.lang:type=Memory
---------------------
  Verbose: false
  ObjectPendingFinalizationCount: 0
  HeapMemoryUsage:
    committed: 110432256
    init: 0
    max: 2130051072
    used: 63307880
  NonHeapMemoryUsage:
    committed: 140849152
    init: 24317952
    max: 318767104
    used: 121815008

Alternatively, cjmx can run a series of commands and then terminate. This is done by specifying each command as a program argument. For example:

java -jar path/to/cjmx.jar 1234 "describe 'java.lang:type=Memory'" "mbeans 'java.lang:type=Memory' select *"
Object name: java.lang:type=Memory
----------------------------------
Description: Information on the management interface of the MBean

Attributes:
  Verbose: boolean
  ObjectPendingFinalizationCount: int
  HeapMemoryUsage: CompositeData
  NonHeapMemoryUsage: CompositeData

Operations:
  gc(): void

Notifications:
  javax.management.Notification

java.lang:type=Memory
---------------------
  Verbose: false
  ObjectPendingFinalizationCount: 0
  HeapMemoryUsage:
    committed: 110432256
    init: 0
    max: 2130051072
    used: 76943832
  NonHeapMemoryUsage:
    committed: 140980224
    init: 24317952
    max: 318767104
    used: 122049448

All commands have help information available by typing "help" in the console.

Remote Connections

cjmx supports connecting to remote JMX agents. A simple insecure way of running the remote process is:

java -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false MainClass

With this process running on host 'server', you can connect via cjmx using the 'remote-connect' command:

cjmx remote-connect server:7091

Once connected, cjmx supports all the same behaviors as with a local connection.

For a more secure connection, it is recommended you run with SSL and/or with username authentication. Usernames can be specified as the optional second parameter of the 'remote-connect' command:

cjmx remote-connect server:7091 admin

cjmx will then prompt for the password. To use SSL, you must run cjmx with the appropriate javax.net.ssl flags.

For more details on configuring JMX agents, see: https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html

cjmx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cjmx's Issues

Support for Java 11

So sorry if this is already addressed somewhere. I've searched everywhere I can think and don't see mention of it. I love cjmx and we use it all over. We're in the midst of upgrading to Java 11 (so we can use HTTP/2).

However in Java 11 the tools.jar is removed from the JAVA_HOME/lib directory and doesn't appear to have a replacement anywhere.

Is there any way to make cjmx work with Java 11?

after run cjmx EXCEPTION_ACCESS_VIOLATION

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000061fdcab8, pid=12708, tid=2524

JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode windows-amd64 compressed oops)
Problematic frame:
V [jvm.dll+0x11cab8]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp

--------------- T H R E A D ---------------

Current thread (0x000000000289e000): JavaThread "main" [_thread_in_vm, id=2524, stack(0x00000000028a0000,0x00000000029a0000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x000000000289e000, RCX=0x000000000289e000, RDX=0x00000007d6204350
RSP=0x000000000299cfe0, RBP=0x0000000000000100, RSI=0x0000000000000100, RDI=0x0000000000000000
R8 =0x0000000000000000, R9 =0x0000000000000100, R10=0x0000000000000000, R11=0x000000000299d020
R12=0x0000000000000000, R13=0x000000077cfa1298, R14=0x000000000299d100, R15=0x000000000289e000
RIP=0x0000000061fdcab8, EFLAGS=0x0000000000010246

Top of Stack: (sp=0x000000000299cfe0)
0x000000000299cfe0: 0000000000000053 0000000800000009
0x000000000299cff0: 000000000cc4e328 000000000289e000
0x000000000299d000: 0000000000000000 00000000ef8b631a
0x000000000299d010: 000000000289d860 0000000061f5fce8
0x000000000299d020: 000000000289e000 000000000cc4e308
0x000000000299d030: 0000000000000b9d 00000000624470c0
0x000000000299d040: 000000000299d0f8 00007ffd36bc1ba7
0x000000000299d050: 00000000a2e2e77c 00000000625b7f80
0x000000000299d060: 000000000289e1e8 0000000000000000
0x000000000299d070: 0000000000000000 0000000002ab3150
0x000000000299d080: 000000077cfa1298 000000000299d0e8
0x000000000299d090: 00000000ef8b631a 0000000002aa60f8
0x000000000299d0a0: 000000000289e000 000000000299d0a8
0x000000000299d0b0: 000000077cfa1298 000000000299d100
0x000000000299d0c0: 000000077cfa22c0 0000000000000000
0x000000000299d0d0: 000000077cfa1298 0000000000000000

Instructions: (pc=0x0000000061fdcab8)
0x0000000061fdca98: 24 38 c6 44 24 30 53 33 d2 48 8b cb c6 44 24 28
0x0000000061fdcaa8: 01 66 89 74 24 70 48 89 7c 24 20 e8 48 e0 06 00
0x0000000061fdcab8: 48 8b 07 48 63 57 10 48 8b 48 78 66 89 34 0a 48
0x0000000061fdcac8: 83 7c 24 48 00 74 0a 48 8d 4c 24 40 e8 67 34 11

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x000000000289e000 is a thread
RCX=0x000000000289e000 is a thread
RDX=0x00000007d6204350 is an oop
java.lang.NoSuchFieldError

  • klass: 'java/lang/NoSuchFieldError'
    RSP=0x000000000299cfe0 is pointing into the stack for thread: 0x000000000289e000
    RBP=0x0000000000000100 is an unknown value
    RSI=0x0000000000000100 is an unknown value
    RDI=0x0000000000000000 is an unknown value
    R8 =0x0000000000000000 is an unknown value
    R9 =0x0000000000000100 is an unknown value
    R10=0x0000000000000000 is an unknown value
    R11=0x000000000299d020 is pointing into the stack for thread: 0x000000000289e000
    R12=0x0000000000000000 is an unknown value
    R13=0x000000077cfa1298 is an oop
    {method}
  • klass: {other class}
    R14=0x000000000299d100 is pointing into the stack for thread: 0x000000000289e000
    R15=0x000000000289e000 is a thread

Stack: [0x00000000028a0000,0x00000000029a0000], sp=0x000000000299cfe0, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x11cab8]

[error occurred during error reporting (printing native stack), id 0xc0000005]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.fusesource.jansi.internal.Kernel32.init()V+0
j org.fusesource.jansi.internal.Kernel32.()V+20
v ~StubRoutines::call_stub
j org.fusesource.jansi.WindowsAnsiOutputStream.()V+0
v ~StubRoutines::call_stub
j org.fusesource.jansi.AnsiConsole.wrapOutputStream(Ljava/io/OutputStream;)Ljava/io/OutputStream;+42
j org.fusesource.jansi.AnsiConsole.()V+13
v ~StubRoutines::call_stub
j jline.AnsiWindowsTerminal.detectAnsiSupport()Z+7
j jline.AnsiWindowsTerminal.()V+5
v ~StubRoutines::call_stub
j sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;+0
j sun.reflect.NativeConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+72
j sun.reflect.DelegatingConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+5
j java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+79
j java.lang.Class.newInstance()Ljava/lang/Object;+132
j jline.TerminalFactory.getFlavor(Ljline/TerminalFactory$Flavor;)Ljline/Terminal;+18
j jline.TerminalFactory.create()Ljline/Terminal;+203
j jline.TerminalFactory.get()Ljline/Terminal;+14
j sbt.JLine$.sbt$JLine$$terminal()Ljline/Terminal;+0
j sbt.JLine$.withTerminal(Lscala/Function1;)Ljava/lang/Object;+1
j sbt.JLine$.usingTerminal(Lscala/Function1;)Ljava/lang/Object;+9
j sbt.JLine$.createReader(Lscala/Option;)Ljline/console/ConsoleReader;+9
j sbt.FullReader.(Lscala/Option;Lsbt/complete/Parser;Z)V+14
j cjmx.App$$anonfun$1.apply(Lsbt/complete/Parser;)Lsbt/FullReader;+19
j cjmx.App$$anonfun$1.apply(Ljava/lang/Object;)Ljava/lang/Object;+5
j cjmx.App$$anonfun$cjmx$App$$prefixedReader$1$$anon$2$$anonfun$readLine$1.apply()Lscala/Option;+17
j cjmx.App$$anonfun$cjmx$App$$prefixedReader$1$$anon$2$$anonfun$readLine$1.apply()Ljava/lang/Object;+1
j scala.Option.orElse(Lscala/Function0;)Lscala/Option;+8
j cjmx.App$$anonfun$cjmx$App$$prefixedReader$1$$anon$2.readLine(Ljava/lang/String;Lscala/Option;)Lscala/Option;+24
j cjmx.cli.REPL$.readLine$1(Lscala/Function1;Lsbt/complete/Parser;)Lscala/Option;+31
j cjmx.cli.REPL$.runR$1(Lcjmx/cli/ActionContext;Lscala/Function1;Ljava/io/PrintStream;Lscalaz/stream/Process;)I+104
j cjmx.cli.REPL$.run(Lscala/Function1;Ljava/io/PrintStream;)I+82
j cjmx.App$.run([Ljava/lang/String;)I+105
j cjmx.Main$.main([Ljava/lang/String;)V+4
j cjmx.Main.main([Ljava/lang/String;)V+4
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x000000000c9a7800 JavaThread "JMX client heartbeat 2" daemon [_thread_blocked, id=11652, stack(0x000000000d970000,0x000000000da70000)]
0x000000000ca96800 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=12416, stack(0x000000000d870000,0x000000000d970000)]
0x000000000ccf5000 JavaThread "GC Daemon" daemon [_thread_blocked, id=11588, stack(0x000000000d770000,0x000000000d870000)]
0x000000000ccf4800 JavaThread "RMI RenewClean-[192.168.9.71:61945]" daemon [_thread_blocked, id=9884, stack(0x000000000d670000,0x000000000d770000)]
0x000000000adc6800 JavaThread "Service Thread" daemon [_thread_blocked, id=12464, stack(0x000000000c530000,0x000000000c630000)]
0x000000000adbf800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=12736, stack(0x000000000c430000,0x000000000c530000)]
0x000000000adbd800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=12092, stack(0x000000000c330000,0x000000000c430000)]
0x000000000adbc800 JavaThread "Attach Listener" daemon [_thread_blocked, id=11192, stack(0x000000000c230000,0x000000000c330000)]
0x000000000adb9800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5588, stack(0x000000000c130000,0x000000000c230000)]
0x000000000ad7f800 JavaThread "Finalizer" daemon [_thread_blocked, id=11288, stack(0x000000000c030000,0x000000000c130000)]
0x000000000ad76800 JavaThread "Reference Handler" daemon [_thread_blocked, id=4992, stack(0x000000000bf30000,0x000000000c030000)]
=>0x000000000289e000 JavaThread "main" [_thread_in_vm, id=2524, stack(0x00000000028a0000,0x00000000029a0000)]

Other Threads:
0x000000000ad72800 VMThread [stack: 0x000000000be30000,0x000000000bf30000] [id=5504]
0x000000000addc000 WatcherThread [stack: 0x000000000c630000,0x000000000c730000] [id=12028]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
PSYoungGen total 38400K, used 5948K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 17% used [0x00000007d5c80000,0x00000007d624f000,0x00000007d7d00000)
from space 5120K, 0% used [0x00000007d8200000,0x00000007d8200000,0x00000007d8700000)
to space 5120K, 0% used [0x00000007d7d00000,0x00000007d7d00000,0x00000007d8200000)
ParOldGen total 86016K, used 1189K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 1% used [0x0000000781600000,0x0000000781729528,0x0000000786a00000)
PSPermGen total 21504K, used 11936K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 55% used [0x000000077c400000,0x000000077cfa82f8,0x000000077d900000)

Card table byte_map: [0x0000000005b60000,0x0000000005f80000] byte_map_base: 0x0000000001f7e000

Polling page: 0x0000000000f20000

Code Cache [0x0000000002aa0000, 0x0000000002d10000, 0x0000000005aa0000)
total_blobs=357 nmethods=95 adapters=215 free_code_cache=48507Kb largest_free_block=49640128

Compilation events (10 events):
Event: 4.128 Thread 0x000000000adbd800 91 java.lang.String::substring (79 bytes)
Event: 4.141 Thread 0x000000000adbd800 nmethod 91 0x0000000002b364d0 code [0x0000000002b36620, 0x0000000002b36978]
Event: 4.218 Thread 0x000000000adbd800 92 sun.misc.URLClassPath::getResource (74 bytes)
Event: 4.257 Thread 0x000000000adbf800 nmethod 90 0x0000000002b3cad0 code [0x0000000002b3cd80, 0x0000000002b3e598]
Event: 4.310 Thread 0x000000000adbf800 94 ! sun.misc.URLClassPath$JarLoader::getResource (91 bytes)
Event: 4.352 Thread 0x000000000adbf800 nmethod 94 0x0000000002b38790 code [0x0000000002b38980, 0x0000000002b39060]
Event: 4.403 Thread 0x000000000adbd800 nmethod 92 0x0000000002b43e50 code [0x0000000002b441c0, 0x0000000002b46a70]
Event: 4.430 Thread 0x000000000adbf800 95 java.util.HashMap::transfer (115 bytes)
Event: 4.444 Thread 0x000000000adbf800 nmethod 95 0x0000000002b36c10 code [0x0000000002b36d60, 0x0000000002b37048]
Event: 4.459 Thread 0x000000000adbd800 96 % sun.misc.URLClassPath::getResource @ 39 (74 bytes)

GC Heap History (6 events):
Event: 2.785 GC heap before
{Heap before GC invocations=1 (full 0):
PSYoungGen total 38400K, used 33280K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 100% used [0x00000007d5c80000,0x00000007d7d00000,0x00000007d7d00000)
from space 5120K, 0% used [0x00000007d8200000,0x00000007d8200000,0x00000007d8700000)
to space 5120K, 0% used [0x00000007d7d00000,0x00000007d7d00000,0x00000007d8200000)
ParOldGen total 86016K, used 0K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 0% used [0x0000000781600000,0x0000000781600000,0x0000000786a00000)
PSPermGen total 21504K, used 8362K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 38% used [0x000000077c400000,0x000000077cc2aaa0,0x000000077d900000)
Event: 2.808 GC heap after
Heap after GC invocations=1 (full 0):
PSYoungGen total 38400K, used 4947K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 0% used [0x00000007d5c80000,0x00000007d5c80000,0x00000007d7d00000)
from space 5120K, 96% used [0x00000007d7d00000,0x00000007d81d4d58,0x00000007d8200000)
to space 5120K, 0% used [0x00000007d8200000,0x00000007d8200000,0x00000007d8700000)
ParOldGen total 86016K, used 8K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 0% used [0x0000000781600000,0x0000000781602000,0x0000000786a00000)
PSPermGen total 21504K, used 8362K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 38% used [0x000000077c400000,0x000000077cc2aaa0,0x000000077d900000)
}
Event: 3.565 GC heap before
{Heap before GC invocations=2 (full 0):
PSYoungGen total 38400K, used 11218K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 18% used [0x00000007d5c80000,0x00000007d629fc08,0x00000007d7d00000)
from space 5120K, 96% used [0x00000007d7d00000,0x00000007d81d4d58,0x00000007d8200000)
to space 5120K, 0% used [0x00000007d8200000,0x00000007d8200000,0x00000007d8700000)
ParOldGen total 86016K, used 8K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 0% used [0x0000000781600000,0x0000000781602000,0x0000000786a00000)
PSPermGen total 21504K, used 10355K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 48% used [0x000000077c400000,0x000000077ce1cc90,0x000000077d900000)
Event: 3.576 GC heap after
Heap after GC invocations=2 (full 0):
PSYoungGen total 38400K, used 1296K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 0% used [0x00000007d5c80000,0x00000007d5c80000,0x00000007d7d00000)
from space 5120K, 25% used [0x00000007d8200000,0x00000007d8344010,0x00000007d8700000)
to space 5120K, 0% used [0x00000007d7d00000,0x00000007d7d00000,0x00000007d8200000)
ParOldGen total 86016K, used 16K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 0% used [0x0000000781600000,0x0000000781604000,0x0000000786a00000)
PSPermGen total 21504K, used 10355K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 48% used [0x000000077c400000,0x000000077ce1cc90,0x000000077d900000)
}
Event: 3.576 GC heap before
{Heap before GC invocations=3 (full 1):
PSYoungGen total 38400K, used 1296K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 0% used [0x00000007d5c80000,0x00000007d5c80000,0x00000007d7d00000)
from space 5120K, 25% used [0x00000007d8200000,0x00000007d8344010,0x00000007d8700000)
to space 5120K, 0% used [0x00000007d7d00000,0x00000007d7d00000,0x00000007d8200000)
ParOldGen total 86016K, used 16K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 0% used [0x0000000781600000,0x0000000781604000,0x0000000786a00000)
PSPermGen total 21504K, used 10355K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 48% used [0x000000077c400000,0x000000077ce1cc90,0x000000077d900000)
Event: 3.693 GC heap after
Heap after GC invocations=3 (full 1):
PSYoungGen total 38400K, used 0K [0x00000007d5c80000, 0x00000007d8700000, 0x0000000800000000)
eden space 33280K, 0% used [0x00000007d5c80000,0x00000007d5c80000,0x00000007d7d00000)
from space 5120K, 0% used [0x00000007d8200000,0x00000007d8200000,0x00000007d8700000)
to space 5120K, 0% used [0x00000007d7d00000,0x00000007d7d00000,0x00000007d8200000)
ParOldGen total 86016K, used 1189K [0x0000000781600000, 0x0000000786a00000, 0x00000007d5c80000)
object space 86016K, 1% used [0x0000000781600000,0x0000000781729528,0x0000000786a00000)
PSPermGen total 21504K, used 10339K [0x000000077c400000, 0x000000077d900000, 0x0000000781600000)
object space 21504K, 48% used [0x000000077c400000,0x000000077ce18f58,0x000000077d900000)
}

Deoptimization events (9 events):
Event: 1.223 Thread 0x000000000289e000 Uncommon trap: reason=unloaded action=reinterpret pc=0x0000000002b09e48 method=sun.misc.URLClassPath.getLoader(I)Lsun/misc/URLClassPath$Loader; @ 113
Event: 1.388 Thread 0x000000000289e000 Uncommon trap: reason=null_check action=make_not_entrant pc=0x0000000002b13904 method=java.util.jar.JarFile.getJarEntry(Ljava/lang/String;)Ljava/util/jar/JarEntry; @ 5
Event: 1.549 Thread 0x000000000289e000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000002b0b820 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 1.549 Thread 0x000000000289e000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000002b0b820 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 1.549 Thread 0x000000000289e000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000002b0b820 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 1.549 Thread 0x000000000289e000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000002b0b820 method=java.util.regex.Matcher.match(II)Z @ 86
Event: 1.707 Thread 0x000000000289e000 Uncommon trap: reason=unreached action=reinterpret pc=0x0000000002b15a24 method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1
Event: 4.414 Thread 0x000000000289e000 Uncommon trap: reason=null_check action=make_not_entrant pc=0x0000000002b08648 method=java.lang.String.equals(Ljava/lang/Object;)Z @ 8
Event: 4.443 Thread 0x000000000289e000 Uncommon trap: reason=unreached action=reinterpret pc=0x0000000002b23100 method=java.util.TreeMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; @ 55

Internal exceptions (10 events):
Event: 4.448 Thread 0x000000000289e000 Threw 0x00000007d61c5c98 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.450 Thread 0x000000000289e000 Threw 0x00000007d61cff60 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.451 Thread 0x000000000289e000 Threw 0x00000007d61d3a70 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.455 Thread 0x000000000289e000 Threw 0x00000007d61d6910 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.457 Thread 0x000000000289e000 Threw 0x00000007d61db748 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.458 Thread 0x000000000289e000 Threw 0x00000007d61de300 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.459 Thread 0x000000000289e000 Threw 0x00000007d61e0f68 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.460 Thread 0x000000000289e000 Threw 0x00000007d61e53c8 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.462 Thread 0x000000000289e000 Threw 0x00000007d61ea5d0 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jvm.cpp:1304
Event: 4.506 Thread 0x000000000289e000 Threw 0x00000007d6204350 at C:\re\jdk7u79\2331\hotspot\src\share\vm\prims\jni.cpp:2973

Events (10 events):
Event: 4.466 loading class 0x00000000029f4bd0
Event: 4.466 loading class 0x00000000029f4bd0 done
Event: 4.480 loading class 0x0000000002a2d450
Event: 4.481 loading class 0x0000000002a2d450 done
Event: 4.489 loading class 0x0000000002a2d3f0
Event: 4.489 loading class 0x0000000002a2d3f0 done
Event: 4.489 loading class 0x000000000c7f2540
Event: 4.489 loading class 0x000000000c7f2540 done
Event: 4.505 loading class 0x00000000029e8e40
Event: 4.506 loading class 0x00000000029e8e40 done

Dynamic libraries:
0x00007ff702d80000 - 0x00007ff702db3000 C:\Program Files\Java\jdk1.7.0_79\bin\java.exe
0x00007ffd3d9c0000 - 0x00007ffd3db81000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffd3b6e0000 - 0x00007ffd3b78d000 C:\WINDOWS\system32\KERNEL32.DLL
0x00007ffd3aeb0000 - 0x00007ffd3b08d000 C:\WINDOWS\system32\KERNELBASE.dll
0x00007ffd3d7f0000 - 0x00007ffd3d896000 C:\WINDOWS\system32\ADVAPI32.dll
0x00007ffd3b640000 - 0x00007ffd3b6dd000 C:\WINDOWS\system32\msvcrt.dll
0x00007ffd3d730000 - 0x00007ffd3d78b000 C:\WINDOWS\system32\sechost.dll
0x00007ffd3bfd0000 - 0x00007ffd3c0f6000 C:\WINDOWS\system32\RPCRT4.dll
0x00007ffd3b790000 - 0x00007ffd3b8de000 C:\WINDOWS\system32\USER32.dll
0x00007ffd3b0e0000 - 0x00007ffd3b266000 C:\WINDOWS\system32\GDI32.dll
0x00007ffd2dd10000 - 0x00007ffd2df84000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10240.16384_none_f41f7b285750ef43\COMCTL32.dll
0x00007ffd3b0a0000 - 0x00007ffd3b0d6000 C:\WINDOWS\system32\IMM32.DLL
0x00007ffd3b4e0000 - 0x00007ffd3b63c000 C:\WINDOWS\system32\MSCTF.dll
0x00000000626a0000 - 0x0000000062772000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\msvcr100.dll
0x0000000061ec0000 - 0x0000000062695000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\server\jvm.dll
0x00007ffd3ba30000 - 0x00007ffd3ba38000 C:\WINDOWS\system32\PSAPI.DLL
0x00007ffd371f0000 - 0x00007ffd371f9000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffd38a40000 - 0x00007ffd38a63000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffd3d8a0000 - 0x00007ffd3d909000 C:\WINDOWS\system32\WS2_32.dll
0x00007ffd3bdf0000 - 0x00007ffd3bdf8000 C:\WINDOWS\system32\NSI.dll
0x0000000000ef0000 - 0x0000000000f1c000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll
0x00007ffd3a6c0000 - 0x00007ffd3a704000 C:\WINDOWS\system32\cfgmgr32.dll
0x00007ffd38d60000 - 0x00007ffd38d87000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll
0x0000000061eb0000 - 0x0000000061ebf000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\verify.dll
0x0000000061e80000 - 0x0000000061ea8000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\java.dll
0x0000000061e60000 - 0x0000000061e75000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\zip.dll
0x0000000061dc0000 - 0x0000000061dc9000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\attach.dll
0x0000000061e40000 - 0x0000000061e5a000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\net.dll
0x00007ffd39af0000 - 0x00007ffd39b4d000 C:\WINDOWS\system32\mswsock.dll
0x00007ffd24ba0000 - 0x00007ffd24bb5000 C:\WINDOWS\system32\napinsp.dll
0x00007ffd24b80000 - 0x00007ffd24b9a000 C:\WINDOWS\system32\pnrpnsp.dll
0x00007ffd37f70000 - 0x00007ffd37f88000 C:\WINDOWS\system32\NLAapi.dll
0x00007ffd39b50000 - 0x00007ffd39bf8000 C:\WINDOWS\SYSTEM32\DNSAPI.dll
0x00007ffd28c40000 - 0x00007ffd28c4d000 C:\WINDOWS\System32\winrnr.dll
0x00007ffd28b90000 - 0x00007ffd28ba5000 C:\WINDOWS\system32\wshbth.dll
0x00007ffd2ec20000 - 0x00007ffd2ec2a000 C:\Windows\System32\rasadhlp.dll
0x00007ffd36fa0000 - 0x00007ffd36fd8000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
0x00007ffd36f50000 - 0x00007ffd36f5b000 C:\WINDOWS\SYSTEM32\WINNSI.DLL
0x00007ffd33090000 - 0x00007ffd330f8000 C:\WINDOWS\System32\fwpuclnt.dll
0x00007ffd3a320000 - 0x00007ffd3a348000 C:\WINDOWS\SYSTEM32\bcrypt.dll
0x00007ffd39c60000 - 0x00007ffd39c77000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll
0x00007ffd39910000 - 0x00007ffd39943000 C:\WINDOWS\system32\rsaenh.dll
0x00007ffd39cb0000 - 0x00007ffd39ccf000 C:\WINDOWS\SYSTEM32\USERENV.dll
0x00007ffd3a3f0000 - 0x00007ffd3a403000 C:\WINDOWS\system32\profapi.dll
0x00007ffd3a210000 - 0x00007ffd3a27b000 C:\WINDOWS\system32\bcryptprimitives.dll
0x00007ffd39e40000 - 0x00007ffd39e4b000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
0x00007ffd33d10000 - 0x00007ffd33d26000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
0x00007ffd345e0000 - 0x00007ffd345fa000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
0x0000000061e20000 - 0x0000000061e31000 C:\Program Files\Java\jdk1.7.0_79\jre\bin\nio.dll
0x00007ffd36bc0000 - 0x00007ffd36bca000 C:\Users\pkorim\AppData\Local\Temp\jansi-64-7280291655003568062.dll
0x00007ffd37820000 - 0x00007ffd379aa000 C:\WINDOWS\SYSTEM32\dbghelp.dll

VM Arguments:
java_command: cjmx.Main 8132
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
PATH=C:\Program Files\Dell\DW WLAN Card;;C:\Program Files\Java\jdk1.7.0_79\bin;C:\app\client\pkorim\product\12.1.0\client_1\bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Subversion\bin;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\cURL\bin;C:\Users\pkorim.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft Emulator Manager\1.0;C:\Program Files (x86)\Skype\Phone;C:\Program Files\Git\cmd;C:\Program Files (x86)\apache-maven-3.2.2\bin;C:\Program Files (x86)\WinSCP;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\scala\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files\SmartBear\SoapUI-5.2.0\bin;C:\Program Files (x86)\IDM Computer Solutions\UEStudio;C:\Program Files (x86)\IDM Computer Solutions\UltraCompare;C:\Program Files (x86)\CMake\bin;C:\Qt\5.4\mingw491_32\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\Program Files (x86)\IDM Computer Solutions\IDM Computer Solutions\UEStudio;C:\Program Files (x86)\Nmap
USERNAME=pkorim
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 61 Stepping 4, GenuineIntel

--------------- S Y S T E M ---------------

OS: Windows 8.1 , 64 bit Build 9600

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 61 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, erms, ht, tsc, tscinvbit

Memory: 4k page, physical 8291108k(2179796k free), swap 15106852k(3690464k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (24.79-b02) for windows-amd64 JRE (1.7.0_79-b15), built on Apr 10 2015 12:36:16 by "java_re" with unknown MS VC++:1600

time: Mon Oct 12 14:35:32 2015
elapsed time: 4 seconds

Make last arguments be available through Alt + . (like in the bash)

In bash you can use the shortcut Alt + . to access the last argument of your last commands. It would be great if cjmx would support something similar, too. Or even better to traverse through all last arguments and not only the last one. This way you would not have to retype the long MBean names again.

Throw Exception with Jrockit 1.6 "Trying to get a virtual dispatch offset ..."

$ /Oracle/Middleware/jrockit_160_22_D1.1.1-3/bin/java -cp /Oracle/Middleware/jrockit_160_22_D1.1.1-3/lib/tools.jar:/cjmx-master/cjmx_2.10-2.3.0-app.jar cjmx.Main

[ERROR][class ] Trying to get a virtual dispatch offset for interface scala/collection/immutable/StringLike
Exception in thread "Main Thread" java.lang.ExceptionInInitializerError
at cjmx.App$.run(App.scala:33)
at cjmx.Main$.main(Main.scala:7)
at cjmx.Main.main(Main.scala)
Caused by: java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
at java.util.regex.Matcher.reset(Matcher.java:291)
at java.util.regex.Matcher.(Matcher.java:211)
at java.util.regex.Pattern.matcher(Pattern.java:888)
at java.util.Formatter.parse(Formatter.java:2458)
at java.util.Formatter.format(Formatter.java:2414)
at java.util.Formatter.format(Formatter.java:2367)
at java.lang.String.format(String.java:2769)
at scala.collection.immutable.StringLike$class.format(StringLike.scala:266)
at scala.collection.immutable.StringOps.format(StringOps.scala:31)
at cjmx.cli.REPL$.(REPL.scala:66)
at cjmx.cli.REPL$.(REPL.scala)
... 3 more

Attempting to serialize an attribute with a Double.NaN value fails

When JsonMessageFormatter attempts to serialize an attribute with a value that is Double.NaN gson library is not capable of handling. Special handling for this case may be required. Sample exception is:

java.lang.IllegalArgumentException: NaN is not a valid double value as per JSON specification. To override this behavior, use GsonBuilder.serializeSpecialDoubleValues() method. at com.google.gson.Gson.checkValidFloatingPoint(Gson.java:301) at com.google.gson.Gson.access$000(Gson.java:98) at com.google.gson.Gson$4.write(Gson.java:269) at com.google.gson.Gson$4.write(Gson.java:255) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJsonTree(Gson.java:479) at com.google.gson.Gson.toJsonTree(Gson.java:458) at com.google.gson.Gson$3.serialize(Gson.java:137) at cjmx.cli.JsonMessageFormatter$AttributesSerializer$$anonfun$serialize$1.apply(JsonMessageFormatter.scala:74) at cjmx.cli.JsonMessageFormatter$AttributesSerializer$$anonfun$serialize$1.apply(JsonMessageFormatter.scala:73) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at cjmx.cli.JsonMessageFormatter$AttributesSerializer$.serialize(JsonMessageFormatter.scala:73) at cjmx.cli.JsonMessageFormatter$AttributesSerializer$.serialize(JsonMessageFormatter.scala:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.write(MapTypeAdapterFactory.java:209) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.write(MapTypeAdapterFactory.java:146) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJson(Gson.java:565) at com.google.gson.Gson.toJson(Gson.java:520) at com.google.gson.Gson.toJson(Gson.java:500) at cjmx.cli.JsonMessageFormatter.toJson(JsonMessageFormatter.scala:43) at cjmx.cli.JsonMessageFormatter.formatAttributes(JsonMessageFormatter.scala:53) at cjmx.cli.JsonMessageFormatter.formatAttributes(JsonMessageFormatter.scala:29) at cjmx.cli.actions.Query.act(Query.scala:21) at cjmx.cli.SimpleConnectedAction$class.applyConnected(SimpleConnectedAction.scala:7) at cjmx.cli.actions.Query.applyConnected(Query.scala:12) at cjmx.cli.ConnectedAction$class.apply(ConnectedAction.scala:7) at cjmx.cli.actions.Query.apply(Query.scala:12) at cjmx.cli.actions.Query.apply(Query.scala:12)

unable to one-line remote-connect

Hi,
good stuff. Exactly what I needed. In the wiki its marked out that one can start the tool and do queries just by appending the commands after the java call. Unfortunately this somehow does not work with the remote-connect command. I tried several ways before giving up.
I ended up using a little "expect" magic.

i.e:
#!/bin/bash

expect << EOI
set timeout 5
spawn /opt/j2sdk/bin/java -cp /opt/jdk1.8.0_91/lib/tools.jar:cjmx_2.11-2.5.0-app.jar cjmx.Main
expect ">"
send "remote-connect $1:6002\r";
send "format json\r";
send "mbeans 'de.plath.csc:type=lookup,name=tkbFrequencyListLookup' select *\r";
expect eof
EOI

It works quite well. But might not be the idea of how to use it.

regards,
Rüdiger

AttachProvider ServiceConfigurationError

Running on MacOS, I get the following error reported on startup (always). It does not prevent cjmx from working - I assume similar messages show for other providers on other operating systems but haven't confirmed.

In Java 8 the error is reported just as the first line below without stack track. On Java 11 it includes a stack trace.

java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.BsdAttachProvider not found
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1211)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
	at jdk.attach/com.sun.tools.attach.spi.AttachProvider.providers(AttachProvider.java:258)
	at jdk.attach/com.sun.tools.attach.VirtualMachine.list(VirtualMachine.java:144)
	at cjmx.util.jmx.Attach$.localVMs(Attach.scala:13)
	at cjmx.util.jmx.Attach$.localVMIDs(Attach.scala:16)
	at cjmx.cli.REPL$.runR$1(REPL.scala:22)
	at cjmx.cli.REPL$.run(REPL.scala:55)
	at cjmx.App$.run(App.scala:34)
	at cjmx.Main$.main(Main.scala:5)
	at cjmx.Main.main(Main.scala)

I spent some time to track down what causes it. When listing the VMs the internal logic iterates the providers. Accessing the providers invokes the ServiceLoader, which looks in each JAR for a text file called META-INF/services/com.sun.tools.attach.spi.AttachProvider. Each line in that file is loaded as a class from within that jar.

The app jar cjmx_2.12-xxx-app.jar appears to include referenced classes from the tools.jar file. The problem is that this includes META-INF/services/com.sun.tools.attach.spi.AttachProvider, but does not include the class that is referenced inside that file (sun.tools.attach.BsdAttachProvider if you're on MacOs).

Removing META-INF/services from the jar file prevents the error (and doesn't appear to have any deleterious effect, but I've only tested on Java 11).

It looks to me like this is probably something that would need to be fixed in the proguard configuration in the build script, but both scala and sbt are foreign to me.

remote-connect insists on a lowercase hostname

remote-connect insists on a lowercase hostname and throws bogus error messages if the hostname happens to be uppercase.

java -cp /usr/local/java/lib/tools.jar:/home/xx/cjmx/cjmx_2.11-2.3.0-app.jar cjmx.Main

remote-connect XXX03:17168
[error] Expected '-q '
[error] Expected character in '-abcdefghijklmnopqrstuvwxyz0123456789'
[error] Expected character in '.0123456789'
[error] Expected ':'
[error] remote-connect DLH03:17168
[error] ^
remote-connect xxx03:17168
Connected to remote virtual machine service:jmx:rmi:///jndi/rmi://xxx03:17168/jmxrmi
Connection id: rmi://1.2.3.4 5
Default domain: DefaultDomain
8 domains registered consisting of 291 total MBeans

double type display have problem

I use cjmx to read kafka's jmx info,but some attribute display likely uncorrect

Attributes:
Count: long
RateUnit: TimeUnit
EventType: String
MeanRate: double
OneMinuteRate: double
FiveMinuteRate: double
FifteenMinuteRate: double

Count: 14270101
RateUnit: SECONDS
EventType: bytes
MeanRate: 12.290604572633972
OneMinuteRate: 3.328562550729808E-61
FiveMinuteRate: 9.017959305907854E-11
FifteenMinuteRate: 0.031762071614678714

the number of OneMinuteRate don't like sensible.

Cannot execute one shot command on remote host

If I execute the following command:

java -cp $JAVA_HOME/lib/tools.jar:target/scala-2.11/proguard/cjmx_2.11-2.6.0-SNAPSHOT.jar cjmx.Main "remote-connect localhost:7091" "mbeans 'java.lang:type=Memory' select *"

I can see that cjmx connects to the remote host, but then executes the first argument ("remote-connect localhost:7091") over and over again:

Connected to remote virtual machine service:jmx:rmi:///jndi/rmi://localhost:7091/jmxrmi
Connection id: rmi://192.168.1.136 3
Default domain: DefaultDomain
6 domains registered consisting of 24 total MBeans
[error] Expected 'mbeans '
[error] Expected 'names'
[error] Expected 'names '
[error] Expected 'describe '
[error] Expected 'select '
[error] Expected 'sample '
[error] Expected 'invoke '
[error] Expected 'disconnect'
[error] Invalid input
[error] remote-connect localhost:7091
[error] ^
[error] Expected 'mbeans '
[error] Expected 'names'
[error] Expected 'names '
[error] Expected 'describe '
[error] Expected 'select '
[error] Expected 'sample '
[error] Expected 'invoke '
[error] Expected 'disconnect'
[error] Invalid input
[error] remote-connect localhost:7091
[error] ^

...

Upgrade to Scala 3

Currently blocked by set-completion, which is only available (to the best of my knowledge) for 2.12: https://search.maven.org/artifact/org.scala-sbt/completion_2.12/1.8.0/jar

Some other options:

  1. Source dependency on sbt-completion
  2. Inlining set-completion in to this project
  3. Porting to another parsing library that has built-in completion support (not sure of candidates here though -- cats-parse doesn't support completions (again, to best of my knowledge))

Document syntax to run multiple commands

I'm trying to run a one-liner that sets the format then runs a command. I can't seem to find what the separator is to run multiple commands. Using expect does work but I'd rather not have to use another tool. Hopefully I've missed something obvious.

Publish maven repositories for scala dependencies.

I banged my head on this for 20-30 minutes then gave up.

The full dependencies for cjmx don't work out of the box.

Not all of them are published on maven central and you don't document where the remaining dependencies should be fetched from.

Probably just 4-5 lines on which repositories need to be added.

I was creating debian packages for cjmx so I can use it in my app and I need to resolve an fetch all deps.

sbt has been removed in lastest version

The file "sbt" has been removed in the latest version.

Building the project as descibed in the README is no longer possible:

To build, run ./sbt publish-local. This will build target/scala-2.10/proguard/cjmx_2.12-2.7.0-SNAPSHOT.jar and install a copy to your local ivy cache.

I suppose now it's required to install sbt on the operating system and then run 'sbt publish-local'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.