Jmap is a java tool used for memory profiling. It is used to take a heap snapshot (dump the heap without affecting the running process).
However, when running jmap against the OneClickService.exe process on Windows the following error is returned:
> jmap -dump:format=b,file=heap.hprof 4820
4820: Not enough storage is available to process this command
This error happens because jmap cannot run against a running service.
To resolve this issue, stop the Spectrum tomcat service, open a bash shell and navigate to the $SPECROOT/tomcat/bin directory and
launch OneClickService.exe as follows:
> OneClickService.exe --start --debug
Let tomcat initialize and once the issue reproduces you can now run jmap against the OneClickService.exe process since it is now running in debug mode. The output will be similar to this:
> jmap -dump:format=b,file=heap.hprof < PID of OneClickService.exe>
Dumping heap to C:\win32app\Spectrum\Java\bin\heap.hprof ...
Heap dump file created
The jmap tool should be used at the recommendation of CA Spectrum support. Resulting heap.hprof files can be sent to CA Spectrum support for analysis.