Discussion:
Issue in changing the default location for heap&core dumps..
(too old to reply)
b***@yahoo.com
2007-10-19 14:19:27 UTC
Permalink
Hi,
Below are the env details:
--------------
WAS Base: 6.0.2.17
AIX: 5.3.0.0
Java version = J2RE 1.4.2
----------
I'm trying to redirect the heapdump and javacore file locations to a different directory.
I tried this by setting in the environment variables at the node level.
Environment --> WebSphere Variables --> Node scope --> New

IBM_HEAPDUMPDIR=/apps/logs
IBM_JAVACOREDIR=/apps/logs

saved.

The filesystem permissions are in place.
I restarted the nodeagent, server (just to make sure the changes will take in effect).

When i do 'kill -3 pid', the javacore is still going to
/apps/WebSphere/AppServer/v60/profiles/profile_name
and heapdump is not generated.

I tried the samething on WASND 6.0.2.17, and for the first twotimes 'kill -3 pid', the heapdump files were created in the directory that I mentioned in the variables, but after then it started creating in the profile home directory.

Could you please help in where to look for this issue?
My goal is to redirect the dump files...

Thanks,
Raj
Infyniti
2007-10-19 15:19:10 UTC
Permalink
In order for the heap dump and java cores to write to a different directory, you may want to create the following custom properties for every app server and node agent and dmgr.

Application servers > Application_server > Process Definition > Custom Properties

Name Value
IBM_HEAPDUMP true
IBM_HEAPDUMPDIR /apps/logs
IBM_HEAPDUMP_OUTOFMEMORY true
IBM_HEAP_DUMP true
IBM_JAVACOREDIR /apps/logs
IBM_JAVADUMP_OUTOFMEMORY true
IBM_JAVA_HEAPDUMP_TEXT true
JAVA_DUMP_OPTS ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])

Thanks
Anant
b***@yahoo.com
2007-10-19 15:49:57 UTC
Permalink
grt.. Thanks Anant.

I was in a misconception that those variables should be created at the 'WebSphere Variables' section.
b***@gmail.com
2007-11-30 13:39:42 UTC
Permalink
How do you set this for Nodeagent ? Can we edit the xml or add via the
wsadmin ?

-Nishanth
Post by Infyniti
In order for the heap dump and java cores to write to a different directory, you may want to create the following custom properties for every app server and node agent and dmgr.
Application servers > Application_server > Process Definition > Custom Properties
Name Value
IBM_HEAPDUMP true
IBM_HEAPDUMPDIR /apps/logs
IBM_HEAPDUMP_OUTOFMEMORY true
IBM_HEAP_DUMP true
IBM_JAVACOREDIR /apps/logs
IBM_JAVADUMP_OUTOFMEMORY true
IBM_JAVA_HEAPDUMP_TEXT true
JAVA_DUMP_OPTS ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])
Thanks
Anant
b***@gmail.com
2007-11-30 14:01:03 UTC
Permalink
Ok, just got it..:-))


System Administration --> Node agents --> <Node Agent name> --> Java
and Process Management --> Process Definition --> Environment Entries.

If you click on the Environment Entries the path on top shows up as
'Custom Properties' which is very misleading, but looks like it's a
naming mistake by IBM..!!!

-Nishanth
Post by b***@gmail.com
How do you set this for Nodeagent ? Can we edit the xml or add via the
wsadmin ?
-Nishanth
Post by Infyniti
In order for the heap dump and java cores to write to a different directory, you may want to create the following custom properties for every app server and node agent and dmgr.
Application servers > Application_server > Process Definition > Custom Properties
Name Value
IBM_HEAPDUMP true
IBM_HEAPDUMPDIR /apps/logs
IBM_HEAPDUMP_OUTOFMEMORY true
IBM_HEAP_DUMP true
IBM_JAVACOREDIR /apps/logs
IBM_JAVADUMP_OUTOFMEMORY true
IBM_JAVA_HEAPDUMP_TEXT true
JAVA_DUMP_OPTS ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])
Thanks
Anant- Hide quoted text -
- Show quoted text -
c***@datev.de
2009-06-09 14:11:44 UTC
Permalink
aix 5.3
WAS 6.1 FP21


hi ..

i whant to make these entries for all of our app-server with a jython script.

but i can“t find the donation for the environment value entries?

{code}
SERVER = AdminConfig.getid('/Server:Servername/')
PD = AdminConfig.list('ProcessDef', SERVER)
AdminConfig.modify(PD, [['environment', ['name' 'IBM_JAVA_COREDIR']['value' '${SERVER_LOG_DIR}']]])


WASX7015E: Exception running command: "AdminConfig.modify(PD, [['environment', ['name' 'IBM_JAVA_COREDIR']['value' '${SERVER_LOG_DIR}']]])"; exception information:
com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "", line 1, in ?
TypeError: sequence subscript must be integer or slice

{code}

and i found nowhere the syntax for the AdminConfig.modify .. to modify the ProcessDefinition envionment!

chrsitian
M***@argushealth.com
2009-06-09 15:36:52 UTC
Permalink
Here's the Jython code I use for WAS 6.1:

# Create Process Definition environment properties
envEnt = []
name = \['name', 'IBM_JAVACOREDIR']
reqd = \['required', 'false']
valu = \['value', '${SERVER_LOG_DIR}']
envEnt.append(\[name, reqd, valu])
name = \['name', 'IBM_HEAPDUMPDIR']
envEnt.append(\[name, reqd, valu])

# Add the new environment properties
try: AdminConfig.modify(PD, [\['environment', envEnt]])
except AdminException, why:
___print 'Error modifying process definition environment properties:'
___print why

I had to use underscores in the print statements above for indenting. These would be spaces in actual code.
Loading...