Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?

Reply
Thread Tools

how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?

 
 
Michal Slocinski
Guest
Posts: n/a
 
      12-07-2007
Hi,

I was searching through the web but cannot find answer for that
problem.

Client is running application on Windows using JRE 1.5.0_9 (no chance
to change OS or JVM version). Due to that fact I cannot use any of
following options:
- Ctrl + Break is introduced in 1.5.0_14
- jmap is not available on Windows JVM 1.5

Are there any other options or tools I could use? I would much prefer
creating a dump file over connecting to live system remotely with some
memory profiler.

Michal
 
Reply With Quote
 
 
 
 
Thomas Fritsch
Guest
Posts: n/a
 
      12-07-2007
Michal Slocinski wrote:
> I was searching through the web but cannot find answer for that
> problem.
>
> Client is running application on Windows using JRE 1.5.0_9 (no chance
> to change OS or JVM version). Due to that fact I cannot use any of
> following options:
> - Ctrl + Break is introduced in 1.5.0_14
> - jmap is not available on Windows JVM 1.5
>
> Are there any other options or tools I could use? I would much prefer
> creating a dump file over connecting to live system remotely with some
> memory profiler.

I googled for
"Ctrl + break" signal
and found
<http://www.latenighthacking.com/projects/2003/sendSignal/>
Looks like this is what you need.

--
Thomas
 
Reply With Quote
 
 
 
 
Michal Slocinski
Guest
Posts: n/a
 
      12-07-2007
On Dec 7, 5:33 pm, Thomas Fritsch <i.dont.like.s...@invalid.com>
wrote:
> Michal Slocinski wrote:
> > I was searching through the web but cannot find answer for that
> > problem.

>
> > Client is running application on Windows using JRE 1.5.0_9 (no chance
> > to change OS or JVM version). Due to that fact I cannot use any of
> > following options:
> > - Ctrl + Break is introduced in 1.5.0_14
> > - jmap is not available on Windows JVM 1.5

>
> > Are there any other options or tools I could use? I would much prefer
> > creating a dump file over connecting to live system remotely with some
> > memory profiler.

>
> I googled for
> "Ctrl + break" signal
> and found
> <http://www.latenighthacking.com/projects/2003/sendSignal/>
> Looks like this is what you need.
>
> --
> Thomas


This would be pretty good - however - as I said, this is JVM 1.5.0_9
and Ctrl+Break for heap dumps is introduced in 1.5.0_14:
http://java.sun.com/j2se/1.5.0/ReleaseNotes.html
http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

Michal
 
Reply With Quote
 
Thomas Fritsch
Guest
Posts: n/a
 
      12-07-2007
Michal Slocinski wrote:
> Thomas Fritsch <i.dont.like.s...@invalid.com> wrote:
>>
>>I googled for
>> "Ctrl + break" signal
>>and found
>> <http://www.latenighthacking.com/projects/2003/sendSignal/>
>>Looks like this is what you need.
>>
>>--
>>Thomas

>
>
> This would be pretty good - however - as I said, this is JVM 1.5.0_9
> and Ctrl+Break for heap dumps is introduced in 1.5.0_14:
> http://java.sun.com/j2se/1.5.0/ReleaseNotes.html
> http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf
>
> Michal

You are right, sorry! I overlooked that you mentioned this in your first
post already.

But I tested with "AdaptJ's StackTrace"
<http://www.adaptj.com/root/main/stacktrace> (also mentioned on the web
site of my first reply).
My test application was a little Swing app (running with JDK 1.4.2,
started from within eclipse IDE, as a javaw.exe process)
The StackTrace tool itself was running via WebStart with Java 1.6.0.

Surprisingly the tool (click "Process - Select", and then "Process -
Thread dump") was able to get a thread dump from my Java 1.4 app.

I know this is not quite what you wanted, but at least it is more than
nothing.

--
Thomas
 
Reply With Quote
 
Michal Slocinski
Guest
Posts: n/a
 
      12-07-2007
On Dec 7, 6:41 pm, Thomas Fritsch <i.dont.like.s...@invalid.com>
wrote:
> Michal Slocinski wrote:
> > Thomas Fritsch <i.dont.like.s...@invalid.com> wrote:

>
> >>I googled for
> >> "Ctrl + break" signal
> >>and found
> >> <http://www.latenighthacking.com/projects/2003/sendSignal/>
> >>Looks like this is what you need.

>
> >>--
> >>Thomas

>
> > This would be pretty good - however - as I said, this is JVM 1.5.0_9
> > and Ctrl+Break for heap dumps is introduced in 1.5.0_14:
> >http://java.sun.com/j2se/1.5.0/ReleaseNotes.html
> >http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

>
> > Michal

>
> You are right, sorry! I overlooked that you mentioned this in your first
> post already.
>
> But I tested with "AdaptJ's StackTrace"
> <http://www.adaptj.com/root/main/stacktrace> (also mentioned on the web
> site of my first reply).
> My test application was a little Swing app (running with JDK 1.4.2,
> started from within eclipse IDE, as a javaw.exe process)
> The StackTrace tool itself was running via WebStart with Java 1.6.0.
>
> Surprisingly the tool (click "Process - Select", and then "Process -
> Thread dump") was able to get a thread dump from my Java 1.4 app.
>
> I know this is not quite what you wanted, but at least it is more than
> nothing.
>
> --
> Thomas


Thanks for help. Actually thread dump (stack traces) you can get in
1.4 - this is documented feature. For my problems I found an option
which sounds to fit my requirements:
http://java.sun.com/developer/techni...ing/HPROF.html.
Maybe not 100% but should be pretty good, I'll give it a try next
week.

cheers,

Michal
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      12-08-2007
Michal Slocinski wrote:
>>> This would be pretty good - however - as I said, this is JVM 1.5.0_9
>>> and Ctrl+Break for heap dumps is introduced in 1.5.0_14:


There was a security flaw found in Java which for Java 5 was fixed in Java 5
update 10. You should definitely upgrade to the latest Java 5 (if not all the
way to 6).

<http://sunsolve.sun.com/search/document.do?assetkey=1-26-102934-1>

--
Lew
 
Reply With Quote
 
ajX
Guest
Posts: n/a
 
      02-21-2013
Here is a shell script to take and save thread dump in a text file. I have written a shell script to take the thread dump automatically.

visit : http://www.technotechi.com/2012/12/s...read-dump.html

It might help you.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Diff. the JRE INSIDE the jdk folder and JRE OUTSIDE the JDK folder? Jochen Brenzlinger Java 5 09-02-2011 08:48 PM
Heap dump file size vs heap size Michal Slocinski Java 1 03-25-2008 12:54 PM
Re-engineer application to run in JRE 1.4.2 against old JRE 1.1.7 Prasoon Java 1 04-13-2007 10:20 AM
JRE crash in production ... how to tell JRE is beta? nospawn Java 2 04-25-2006 11:27 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57