Modify attributes on running objects with wsadmin


 

+

Search Tips   |   Advanced Search

 

Use scripting and wsadmin to modify attributes on running objects.

Jython

### Set the ts1 variable to the running object ts1 =AdminControl.completeObjectName('type=TraceService,process=server1,*')

### Modify the running object AdminControl.setAttribute(ts1, 'ringBufferSize', 10)

### We can also modify multiple attribute name and value pairs

### Use Jython list: AdminControl.setAttributes(ts1, [['ringBufferSize', 10], ['traceSpecification', 'com.ibm.*=all=disabled']])

###Use Jython string: AdminControl.setAttributes(ts1, '[[ringBufferSize 10] [traceSpecification com.ibm.*=all=disabled]]')

Jacl

### Set the ts1 variable to the running object set ts1 [$AdminControl completeObjectName type=TraceService,process=server1,*]

### Modify the running object
$AdminControl setAttribute $ts1 ringBufferSize 10

### We can also modify multiple attribute name and value pairs
$AdminControl setAttributes $ts1 {{ringBufferSize 10} {traceSpecification com.ibm.*=all=disabled}}

 

Related tasks

Turning traces on and off in servers processes using scripting
Use AdminControl for scripted administration
Performing operations on running objects using wsadmin

 

Related

Example: Identifying running objects
Commands for AdminControl