Create Process Definition Environment Entries

Introduction

A requirement of a Project may be to place java cores and heap dump to a specific (e.g. /dump) file-system. This can be achieved by adding the following environment entries in the servers process definition ( Application servers �> Application_server �> Process Definition �> Environment Entries):

        IBM_HEAPDUMP true
        IBM_HEAPDUMPDIR /dump
        IBM_HEAPDUMP_OUTOFMEMORY true
        IBM_HEAP_DUMP true
        IBM_JAVACOREDIR /dump
        IBM_JAVADUMP_OUTOFMEMORY true
        IBM_JAVA_HEAPDUMP_TEXT true
        JAVA_DUMP_OPTS ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])

By default, all deployments will have the entries above created apart from IBM_HEAPDUMPDIR and IBM_JAVACOREDIR. This is because other projects may want to keep java cores and heap dumps in the WAS profile root directory or another location. See Step 3 for specifying a different location. Omission of step 3 will create java cores and heap dumps in the WAS profile root directory.

Step 1

This feature is turned ON by default and adds the following entries (which can be found in profile_defaults.py) to the WDM, nodeagents and application servers. If useSpecifiedClusterNodes = 'true' in you py file, the entries will only be added to nodes and application servers listed in 'specifiedNodes'.

        # Process Defintion Environment Entries
        installProcDefEnvEntries = "true"
        envEntries = [[['name', 'IBM_HEAPDUMP'], ['value', 'true']], [['name', 'IBM_HEAPDUMP_OUTOFMEMORY'], ['value', 'true']], [['name', 'IBM_HEAP_DUMP'], ['value', 'true']], [['name', 'IBM_JAVADUMP_OUTOFMEMORY'], ['value', 'true']], [['name', 'IBM_JAVA_HEAPDUMP_TEXT'], ['value', 'true']], [['name', 'JAVA_DUMP_OPTS'], ['value', 'ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])']]]

To turn off creation of Environment Entries, add the following to either your project.py or application py file.

        installProcDefEnvEntries = "false"

Step 2

To add more Process Definition Environment Entries, edit your py file with your name/value pair using the syntax shown in the example below.

        envEntries.append([['name', 'IBM_JAVACOREDIR'], ['value', '/dump']])
        envEntries.append([['name', 'IBM_HEAPDUMPDIR'], ['value', '/dump']])

Please Note: Do not use 'envEntries =' in the py file unless you want to override the default values set in profile_defaults.py.

Step 3

Build and deploy as usual. Alternatively use latest config and deploy as usual.