Monday, November 28, 2011

Dealing with "Not enough storage is available to process this command" exception by PsExec

When I am using Btrace to profiling JVM started with JavaServiceWrapper, I got such an annoyed exception:
CMD> C:\btrace\bin>btrace 3272 Test.java
Not enough storage is available to process this command
1> Login as a admin user anyway (remotely or locally)
2> Download PsTools which includes PsExec.exe , and "PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software", or you can download directly from : http://technet.microsoft.com/en-us/sysinternals/bb897553
3> Get your target PID(java.exe) with processExplorer.exe, download from: http://technet.microsoft.com/en-us/sysinternals/bb896653
4> Then Run your command line again using PsExec help:

CMD> D:\ProcessExplorer\PsTools>PsExec.exe -s "C:\btrace\bin\btrace.bat" 3272 C:\Test.java
 Not only for Btrace, the other external tools can also be run like this way to avoid such a wired Error...

No comments:

Post a Comment