JVisualVM can connect to a remote JVM through JMX.
I need to collect CPU sampling data from remote JVMs the way JVisualVM does. Looks like JVisualVM is collecting sampling data from the exposed MBeans on remote JVMs.
Which classes are relevant in JVisualVM source to start with?