I have a server installed with Windows 2003 and is installed with JDK 1.6 and Tomcat 6. Tomcat 6 is running as a services. I want to get the heap dump of what is in memory using the JMAP utility that comes with JDK 1.6.
When I type the following command
jmap -histo 1132
I get the following error
1132: Not enough storage is available to process this command.
When I run Tomcat 6 manually with a console, I can get the heap dump.
Would appreciate any help.
I have the same issue? Does anyone have any helpful tips?
I assume since you are refering to a server that you are using RDP (Remote Desktop) to access the server and run JMap. I have NEVER seen JMap work over RDP, and I don't understand why. However, I do have a couple of workarounds that worked for me.
1) Console into the box (this is different than typical remote desktop although you use the same command with a different flag). Use
mstsc /console /v:computername
where computername is the system you want to remote into. Using console (which is supposed to be just like physically using the mouse and keyboard) everything works fine.
2) I have cygwin installed on all of my servers and I run SSHD. I can ssh into a server and run JMap successfully.
We also had success by creating a batch file that runs jmap and executing it as a scheduled task.
What worked for me was "mstsc /admin /v:".