How do I run garbage collector from shell?

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

 

You can suggest JBoss to run the garbage collector in different ways: however not many know that it's possible to do it from the command line, using the twilddle utility.

Windows users:
C:\jboss-4.2.2.GA\bin>twiddle invoke "jboss.system:type=Server" runGarbageCollector
Unix users:
[bin]$ ./twiddle.sh invoke jboss.system:type=Server runGarbageCollector

Then you should see from the server log the following message:

13:52:39,281 INFO  [Server] Hinted to the JVM to run garbage collection
13:52:39,281 INFO  [Server] Total/free memory: 170065920/139849848

Related articles available on mastertheboss.com

How do I get the list of MBeans with twiddle?

  JBoss provides a simple command line tool that allows for inte

How to count active session with twiddle ?

  There are some well known alternatives to count the number of

How do I check my application status from shell?

  This is a two process step: at first you need to retrieve the

How do you shut down multiple JBoss instances?

  Supposing you have configured 2 instances of JBoss, one on por

twiddle reference guide

Please note: twiddle is not available any more as default Command

AS 7 Graphical CLI

One new feature of the release 7.1.0 of JBoss AS is the Graphical