Troubleshoot > Work with Diagnostic Providers > View the run time state data or configuring the state data collection specifications for a Diagnostic ProviderModify the State Collection Specification from wsadmin scripts
In addition to modifying the State Collection Specification from the dmgr console, we can also modify these settings using scripts and wsadmin.
In doing problem determination, we might want to begin collecting additional data during normal processing. This can be accomplished by modifying the State Collection Specification dynamically. This section illustrates how to do that through wsadmin . This technique can be used to turn on traces, as well as to turn off traces. Depending on the usage pattern of the component, the impact should take affect shortly after it is set.
- Capture the DiagnosticService ObjectName into a variable. Enter
set DS [lindex [$AdminControl queryNames name=DiagnosticService,*] 0]
- Use this variable to drive the method to set the specification. Enter
$AdminControl invoke $DS setStateCollectionSpec "SampleDiagnosticProvider:player.*=1; SampleDiagnosticProvider:defense.*=1"The specification is of the form DiagnosticProviderName:AttributeId=0|1… (with a semicolon at the end, multiple sub-specifications can be entered similar to the TraceSpec). The DiagnosticProviderName and AttributeId can be proper regular expressions.
Reference:
wsadmin scripting tool
Related information:
State Data Quick Link or Server Selection
State data
Detailed state specification
Change state specification