There is no way just to update the JVM arguments without either using the console or using a command like sed on Unix/Linux to do a find and replace of it, then you would to synchronize the nodes.
Sr. Technology Engineer
Original Message:
Sent: Mon October 02, 2023 08:46 AM
From: Christian Lohmann
Subject: How to change the Generic JVM Arguments using wsadmin command?
This solution doesn't really seem to allow replacing / editing specific parts of the generic JVM arguments.
For example, if these arguments are defined:
"-Xdump:stack:events=allocation,filter=#32m -Xverbosegclog:verbosegc.%Y%m%d.%H%M%S.%pid.txt,10,10000"
then I can't just replace the -Xverbosegclog parameter with another value, e.g. if I want 20000 instead of 10000 cycles. I have to specify the entire string of generic JVM arguments again - which means I need to add some logic to parse and recompose the entire string again -
or is there another solution?
------------------------------
Christian Lohmann
Original Message:
Sent: Sun April 25, 2021 09:44 PM
From: Community Support Admin
Subject: How to change the Generic JVM Arguments using wsadmin command?
You can change the Generic JVM arguments using wsadmin scripting tool.
[wsadmin scripting tool]
https://www.ibm.com/docs/was-nd/9.0.5?topic=scripting-wsadmin-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 change 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]')
* please replace the 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"]')
* please replace xxxxx to your value which you need to use from now on.
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), please refer to the following link:
[ServerManagement command group for the AdminTask object]
https://www.ibm.com/docs/was-nd/9.0.5?topic=scripting-servermanagement-command-group-admintask-object
#Support
#SupportMigration
#WebSphereApplicationServer(WAS)