If running java processes as services on Windows 2008 and later, there is no way to profile them using jvisualvm - you can`t connect to them directly.
Yes, you can use - jmx, jstatd. But there is a way to gather performance data without all that fuzz.
Using psexec (from SysInternals) you can dump all performat data for all java processes with one command line:
psexec \\HOST -accepteula -u DOMAIN_USER -p DOMAIN_PASSWORD -h cmd /c for /f "tokens=1" %i in ('%JAVA_HOME%/bin/jps.exe') do jcmd %i PerfCounter.print
It uses jcmd for dumping all information. You must use the same DOMAIN_USER, DOMAIN_PASSWORD used for services. Do not run java services as LocalSystem!
This will produce output like this:
Yes, you can use - jmx, jstatd. But there is a way to gather performance data without all that fuzz.
Using psexec (from SysInternals) you can dump all performat data for all java processes with one command line:
psexec \\HOST -accepteula -u DOMAIN_USER -p DOMAIN_PASSWORD -h cmd /c for /f "tokens=1" %i in ('%JAVA_HOME%/bin/jps.exe') do jcmd %i PerfCounter.print
It uses jcmd for dumping all information. You must use the same DOMAIN_USER, DOMAIN_PASSWORD used for services. Do not run java services as LocalSystem!
This will produce output like this: