IBM Support

How to change the Generic JVM Arguments using wsadmin command

Question & Answer


Question

What are the commands to change the Generic JVM Arguments using wsadmin scripting tool in WebSphere Application Server?

Answer

You can change the Generic JVM arguments using wsadmin scripting tool.

We have only the function to set/replace it. We don't have a function to remove a part of it.

Here is the sample:
-------------------------------

If you need to set the Generic JVM arguments for server1 under Node01,

1) Start the wsadmin scripting tool

./wsadmin.sh -lang jython -username [username] -password [password] 

2) Check the current Generic JVM arguments

wsadmin>print AdminTask.showJVMProperties('[-nodeName Node01 -serverName server1 -propertyName genericJvmArguments]') 

*You can replace each value to your node name and server name.


3) Set the value for generic JVM arguments

 wsadmin>AdminTask.setGenericJVMArguments('[-nodeName Node01 -serverName server1 -genericJvmArguments "xxxxx"]') 

*You can replace xxxxx to your value that you want to use.

You will receive 'true' after setting it.

4) Save the changes

wsadmin>AdminConfig.save()

5) Check the Generic JVM arguments if it has changed correctly.

wsadmin>print AdminTask.showJVMProperties('[-nodeName Node01 -serverName server1 -propertyName genericJvmArguments]') 

6) Restart the server1 for the changes to take effect.

-------------------------------

For more detail on parameters (setGenericJVMArguments and showJVMProperties), you can refer to the following link:

ServerManagement command group for the AdminTask object

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"ARM Category":[{"code":"a8m0z000000bmEPAAY","label":"WebSphere Application Server traditional-All Platforms-\u003ESystem Management-\u003ETraditional WAS-\u003EConfiguration-\u003ESetting generic JVM arguments in WebSphere Application Server"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
15 November 2022

UID

ibm16839453