Closed simonhf closed 7 years ago
Attaching to a live jvm works only if that target jvm is set up to allow it.
You can instrument you cassandra process with hiccup by adding it as a java agent in the cassandra config. For example, I often do this by adding the following line in cassandra-env.sh , right under the line for the jam agent:
JVM_OPTS=“$JVM_OPTS -javaagent:/
[obviously, replace path and logpath with jHiccup path and the directory to which you want hiccup logs to go to]
Thanks!
Trying to use jHiccup to monitor a Cassandra process but getting an error. Is there a way to attach? Or what are my alternative ways to monitor using jHiccup?
$ locate tools.jar
/usr/java/jdk1.7.0_76/lib/tools.jar $ ps jfax | egrep java 1 20400 20337 20337 ? -1 SLl 397 36362:24 /usr/java/jdk1.7.0_76/jre/bin/java -ea -javaagent:/usr/share/cassandra/lib/jamm-0.3.0.jar ... $ sudo ./jHiccup -p 20400
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded