cassandra-user mailing list archives

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

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:

http://wiki.cyclopsgroup.org/jmxterm

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

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 
org.apache.cassandra.db:type=ColumnFamilies,keyspace=KS1,columnfamily=CF1 
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.

Cheers,

	T.

Mime
View raw message