VerboseGC demonstrates the use of the java.lang.management API to print the garbage collection statistics and memory usage remotely by connecting to a JMX agent with a JMX service URL: service:jmx:rmi:///jndi/rmi://<hostName>:<portNum>/jmxrmi where <hostName> is the hostname and <portNum> is the port number to which the JMX agent will be connected.