cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teijo Holzer <>
Subject Force a garbage collection with jmxterm from the shell
Date Thu, 04 Aug 2011 22:35:36 GMT

The following command line triggers a garbage collection via JMX:

echo 'run -b java.lang:type=Memory gc' | java -jar jmxterm-1.0-alpha-4-uber.jar 
-l service:jmx:rmi:///jndi/rmi://hostname:8080/jmxrmi -n

It uses:

The GC is necessary after a major compaction to trigger the deletion of stale 

jmxterm can also be used to query and modify beans exposed via JMX. That makes 
it easy to integrate into any monitoring & maintenance scripts, e.g.:

echo 'get -b 
ReadCount' | ...

You can also perform multiple operations as once:

echo 'domains\nbeans' | ...

If you are concerned about the start-up speed of the jar, just unpack it. You 
might need to unpack & shuffle the internal jars around a bit as well.



View raw message