Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Are there any way to see files open by java threads

SStJun 3 2011 — edited Jun 3 2011
--- environment ---
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_19-b02, mixed mode)
Linux 2.6.9-78.0.5.ELsmp #1 SMP Wed Sep 24 05:40:24 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Intel(R) Xeon(R) CPU
--------------------------

Hi all,

I'd like to know if, during an outOfMemory, there are any ways to :
1. Have a list of thread at the moment (basically a thread dump)
2. Find out which thread lead to the OOM (even though the thread might just be the 'drop' leading to OOM)
3. Get a sumary of the memory usage (basically a heap dump)track files open by java thread.
4. Get a list of files open by my thread

Our application is facing regularly outOfMemory (OOM) and I know it sometimes load important file, so what I'm testing now is the usage of hprof (-agentlib:hprof=heap=sites,thread=y,depth=2). Sending "kill -3" on my java process creates a file containing a thread dump + memory usage. But this can't help me for question 2.

Regarding question 4 i've tried to correlate output of hprof + pstack + jstack + pmap but I can't get the info I'm looking for (pstack, jstack don't show the address of open files)

Last, if this isn't the right forum for my question, please tell me where I should post it.

Thanks
This post has been answered by 802316 on Jun 3 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2011
Added on Jun 3 2011
4 comments
534 views