This is in the context of Windows Jenkins Slaves. The slave runs under the SYSTEM user, and therefore a maven build is running in a JVM running under the SYSTEM user. When this build is behaving unexpectedly, as in taking ages, it would be useful to be able to inspect the JVM using jvisualvm, however the process ID for the JVM does not show up when jvisualvm is run as a human user.
I understand there is a way of insecurely exposing a JMX port to the JVM when it is instantiated, but as the build is run by Jenkins, and as in this particular the case, the issue occurs intermittently, I would prefer to not go with this option if possible