me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Choose place for memory dump #232

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello

May be I didn't search enough, but I still found no answer.

As I generate a heap dump from my javamelody interface (ver 1.35.0), it is 
automatically placed in tmp dir from the server.

As I work in an organization where server are under someone else responsibility 
and I don't have rights to go in tmp myself, I have to ask to get them.

Is it possible to configure the place where this dump should go, if not, could 
this features be added?

(may be like as statistics files can be configured in web.xml)

Thanks for advance for any help 

Original issue reported on code.google.com by yoplaitd...@gmail.com on 21 Jun 2012 at 1:44

GoogleCodeExporter commented 9 years ago

Original comment by evernat@free.fr on 21 Jun 2012 at 7:04

GoogleCodeExporter commented 9 years ago
Just for information, the location of the heap dump file is not configurable at 
the moment.

Original comment by evernat@free.fr on 16 Sep 2012 at 2:28

GoogleCodeExporter commented 9 years ago
In fact, a VM option named HeapDumpPath exists in Hotspot (Oracle JDK).
Ref: 
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

And I would consider it a bug if it is not used as the directory of heap dump 
files. 

Original comment by evernat@free.fr on 20 Sep 2013 at 8:26

GoogleCodeExporter commented 9 years ago
This is now fixed.
It's committed in trunk (revision 3510) and ready for the next release (1.47).
You will be able to add -XX:HeapDumpPath=/tmp for example, in the java command 
line to specify the directory of the heap dump files. Otherwise the directory 
will be the temporary directory of the server as before.

I have a new build from the trunk including the fix and it is available at:
https://javamelody.googlecode.com/files/javamelody-20130920.jar

Original comment by evernat@free.fr on 20 Sep 2013 at 8:40