当系统抛出java.io.IOException: Too many open files异常时,使用该程序可以帮助我们确认哪些进程打开了哪些文件。
下载地址:http://technet.microsoft.com/en-us/sysinternals/bb896655。
使用方法:
usage: handle [[-a [-l]] [-u] | [-c
-a Dump all handle information.
-l Just show pagefile-backed section handles.
-c Closes the specified handle (interpreted as a hexadecimal number).You must specify the process by its PID. WARNING: Closing handles can cause application or system instability.
-y Don't prompt for close handle confirmation.
-s Print count of each type of handle open.
-u Show the owning user name when searching for handles.
-p Dump handles belonging to process (partial name accepted).
name Search for handles to objects with
No arguments will dump all file references
比如,如果想看看所有java进程打开的文件,可以这样写:handle -p java.exe >output.txt。
输出可能如下:
java.exe pid: 1288 PMA-GLACIER\pma
c: File C:\student\course_wls_troubleshooting\bin
25c: File C:\student\course_wls_troubleshooting\bin\databases\bankdb.dbn
288: File C:\student\course_wls_troubleshooting\bin\databases\bankdb$1.wal
3bc: File C:\bea\jdk142_11\lib\tools.jar
3ec: File C:\bea\weblogic81\common\eval\pointbase\lib\pbserver44.jar
3f4: File C:\bea\weblogic81\common\eval\pointbase\lib\pbtools44.jar
3fc: File C:\bea\weblogic81\common\eval\pointbase\lib\pbclient44.jar
404: File C:\bea\weblogic81\server\lib\wlinformix.jar
40c: File C:\bea\weblogic81\server\lib\wloracle.jar
414: File C:\bea\weblogic81\server\lib\wlsybase.jar
41c: File C:\bea\weblogic81\server\lib\wldb2.jar
424: File C:\bea\weblogic81\server\lib\wlsqlserver.jar
42c: File C:\bea\weblogic81\server\lib\wlutil.jar
434: File C:\bea\weblogic81\server\lib\wlbase.jar
43c: File C:\bea\weblogic81\server\lib\ant\jakarta-oro-2.0.7.jar
444: File C:\bea\weblogic81\server\lib\ant\optional.jar
44c: File C:\bea\weblogic81\server\lib\ant\ant.jar
454: File C:\bea\weblogic81\server\lib\EccpressoJcae.jar
45c: File C:\bea\weblogic81\server\lib\EccpressoCore.jar
464: File C:\bea\weblogic81\server\lib\EccpressoAsn1.jar
46c: File C:\bea\weblogic81\server\lib\jConnect.jar
474: File C:\bea\weblogic81\server\lib\jconn2.jar
47c: File C:\bea\weblogic81\server\lib\ojdbc14.jar
484: File C:\bea\weblogic81\server\lib\xmlx.jar
48c: File C:\bea\weblogic81\server\lib\webservices.jar
494: File C:\bea\weblogic81\server\lib\jsafeFIPS.jar
49c: File C:\bea\weblogic81\server\lib\wlcipher.jar
4a4: File C:\bea\weblogic81\server\lib\weblogic.jar
4ac: File C:\bea\jdk142_11\jre\lib\ext\sunjce_provider.jar
4b4: File C:\bea\jdk142_11\jre\lib\ext\localedata.jar
4bc: File C:\bea\jdk142_11\jre\lib\ext\ldapsec.jar
4c4: File C:\bea\jdk142_11\jre\lib\ext\dnsns.jar
664: File C:\bea\jdk142_11\jre\lib\charsets.jar
66c: File C:\bea\jdk142_11\jre\lib\jce.jar
674: File C:\bea\jdk142_11\jre\lib\jsse.jar
67c: File C:\bea\jdk142_11\jre\lib\sunrsasign.jar
684: File C:\bea\jdk142_11\jre\lib\rt.jar
6a0: Section \BaseNamedObjects\hsperfdata_pma_1288
6a4: File C:\DOCUME~1\pma\LOCALS~1\Temp\hsperfdata_pma\1288
7d8: Section \BaseNamedObjects\ShimSharedMemory
没有评论:
发表评论