Configure the Java virtual machine using scripting

 

+

Search Tips   |   Advanced Search

 

Overview

An example modifying the Java virtual machine (JVM) of a server to turn on debug follows:

### Identify the server and assign it to the server1 variable.
server1 = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
print server1

### Identify the JVM belonging to this server and assign it to the jvm variable.
jvm = AdminConfig.list('JavaVirtualMachine', server1)
print jvm

### Modify the JVM to turn on debug.
AdminConfig.modify(jvm, [['debugMode', 'true'], ['debugArgs', "-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777"]])

AdminConfig.save()