This topic describes the gc command in gfsh, the VMware Tanzu GemFire command-line interface.

Use this command to force garbage collection (GC) on a member or members.

The default is for garbage collection to occur on all caching members.

The gfsh gc command should be used only in non-production environments. This is a forced GC event and not always handled well by the garbage collector outside of normal GC processing. This can cause slow-responding members to be perceived as unresponsive and disconnected from the cluster.

Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.

Syntax:

gc [--groups=value(,value)*] [--member=value]

Name Description
‑‑groups One or more groups of members on which garbage collection will be forced.
‑‑member Name/ID of the member on which garbage collection will be forced.

Table 1. GC Parameters

Example Commands:

gc --member=server1
gc --groups=Group1
gc

Sample Output:

gfsh>gc
Successfully executed GC
check-circle-line exclamation-circle-line close-line
Scroll to top icon