nodegc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
pythongc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
rubygc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
ugc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] [-l {java,node,python,ruby}] pid
-v Print the resulting BPF program, for debugging purposes.
-m Print times in milliseconds. The default is microseconds.
-M MINIMUM Display only collections that are longer than this threshold. The value is given in milliseconds. The default is to display all collections.
-F FILTER Display only collections whose textual description matches (contains) this string. The default is to display all collections. Note that the filtering here is performed in user-space, and not as part of the BPF program. This means that if you have thousands of collection events, specifying this filter will not reduce the amount of data that has to be transferred from the BPF program to the user-space script.
{java,node,python,ruby} The language to trace.
pid The process id to trace.
Trace garbage collections in a specific Node process: # ugc node 148
Trace garbage collections in a specific Java process, and print GC times in milliseconds: # ugc -m java 6004
Trace garbage collections in a specific Java process, and display them only if they are longer than 10ms and have the string "Tenured" in their detailed description: # ugc -M 10 -F Tenured java 6004
START The start time of the GC, in seconds from the beginning of the trace.
TIME The duration of the garbage collection event.
DESCRIPTION The runtime-provided description of this garbage collection event.
Also look in the bcc distribution for a companion _example.txt file containing example usage, output, and commentary for this tool.