You can use scripting to configure the size of Java virtual machine
log files.
About this task
Use the following example to configure the rotation policy settings
for Java virtual machine (JVM) logs:
Procedure
- Identify the application server and assign it to the server1 variable,
for example:
Using Jacl:
set s1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
Using Jython:
s1 = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
print s1
where:
set |
is a Jacl command |
s1 |
is a variable name |
$ |
is a Jacl operator for substituting a variable name
with its value |
AdminConfig |
is an object representing the WebSphere
Application Server configuration |
getid |
is an AdminConfig command |
Cell |
is the object type |
mycell |
is the name of the object that will be modified |
Node |
is the object type |
mynode |
is the name of the object that will be modified |
Server |
is the object type |
server1 |
is the name of the object that will be
modified |
print |
a Jython command |
Example output:server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
- Identify the stream log and assign it to the log variable, for
example:
Example output:
(cells/mycell/nodes/mynode/servers/server1|server.xml#StreamRedirect_2)
- List the current values of the stream log, for example:
- Using Jacl:
$AdminConfig show $log
- Using Jython:
AdminConfig.show(log)
Example output:{baseHour 24}
{fileName ${SERVER_LOG_ROOT}/SystemOut.log}
{formatWrites true}
{maxNumberOfBackupFiles 1}
{messageFormatKind BASIC}
{rolloverPeriod 24}
{rolloverSize 1}
{rolloverType SIZE}
{suppressStackTrace false}
{suppressWrites false}
- Modify the rotation policy for the stream log.
- Save the configuration changes. See the Saving configuration changes with the wsadmin tool
article for more information.
- In a network deployment environment
only, synchronize the node. See the Synchronizing nodes with the wsadmin tool
article for more information.