Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   how to obtain heap dump on demand on windows and JRE 1.5.0_9 ? (http://www.velocityreviews.com/forums/t558104-how-to-obtain-heap-dump-on-demand-on-windows-and-jre-1-5-0_9-a.html)

Michal Slocinski 12-07-2007 04:36 PM

how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?
 
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

Thomas Fritsch 12-07-2007 05:33 PM

Re: how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?
 
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

Michal Slocinski 12-07-2007 05:46 PM

Re: how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?
 
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

Thomas Fritsch 12-07-2007 06:41 PM

Re: how to obtain heap dump on demand on windows and JRE 1.5.0_9?
 
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

Michal Slocinski 12-07-2007 11:30 PM

Re: how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?
 
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

Lew 12-08-2007 01:39 AM

Re: how to obtain heap dump on demand on windows and JRE 1.5.0_9?
 
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

ajX 02-21-2013 06:11 AM

Re: how to obtain heap dump on demand on windows and JRE 1.5.0_9 ?
 
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.


All times are GMT. The time now is 10:53 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.