TraceService MBean

Management interface for the live TraceService function running in a server.


Attribute Summary
intringBufferSize
           the size of the trace output Ring Buffer.
java.lang.StringtraceSpecification
           A Trace specification which allows enabling/disabling tracing for components.
java.lang.StringtraceFileName
           the name of the file to which trace output will be written.

Operation Summary
voidappendTraceString(java.lang.String traceString)
           Add the specified trace string to the trace state already active in the process runtime, without first clearing the current state.
voiddumpRingBuffer(java.lang.String fileToWriteTo)
           Write the contents of the Ras services Ring Buffer to the specified file.
voidclearRingBuffer()
           Discard the current contents of the Ring Buffer.
java.lang.String[]listAllRegisteredComponents()
           Return an array of Strings containing the fully qualified names of all individual components currently registered with Ras services.
java.lang.String[]listAllRegisteredGroups()
           Return an array of Strings containing the names of all Groups currently registered with Ras services.
java.lang.String[]listComponentsInGroup(java.lang.String group)
           Return an array of Strings containing the fully qualified names of all components who have registered as members of the specified group.
com.ibm.websphere.ras.TraceElementState[]getTracedComponents()
           Return an array of TraceElementState objects containing information about the currently registered individual components for which some type of trace is currently enabled.
com.ibm.websphere.ras.TraceElementState[]getTracedGroups()
           Return an array of TraceElementState objects containing information about the currently registered Groups for which some type of trace is currently enabled.
java.lang.StringgetTraceSpecification(java.lang.String component)
           Return the current trace specification for the specified component or group.
voidprocessDumpString(java.lang.String dumpString)
           Instruct dumpable components to write their current state.
voidcheckTraceString(java.lang.String traceString)
           Check the specified trace string to see if it conforms to the TraceString grammar.
voidsetTraceOutputToFile(java.lang.String fileName, int rolloverSize, int numberBackups, java.lang.String traceFormat)
           Make the specified file the active trace destination to which trace is routed.
voidsetTraceOutputToRingBuffer(int ringBufferSize, java.lang.String traceFormat)
           Make the ring buffer the active trace destination to which trace is routed.
java.lang.StringrolloverLogFileImmediate(java.lang.String streamName, java.lang.String fileName)
           Immediately roll the log file for the specified stream and return the name of the archive file.

Attribute Detail

ringBufferSize

public int ringBufferSize
the size of the trace output Ring Buffer.

traceSpecification

public java.lang.String traceSpecification
A Trace specification which allows enabling/disabling tracing for components.

traceFileName

public java.lang.String traceFileName
the name of the file to which trace output will be written. This will be null if trace is configured to write output to the ring buffer.

Operation Detail

appendTraceString

public void appendTraceString(java.lang.String traceString)
Add the specified trace string to the trace state already active in the process runtime, without first clearing the current state.
Parameters:
traceString - a String that complies to the TraceString grammar and passes the checkTraceString() method.

dumpRingBuffer

public void dumpRingBuffer(java.lang.String fileToWriteTo)
Write the contents of the Ras services Ring Buffer to the specified file.
Parameters:
fileToWriteTo - the name of the file to write to.

clearRingBuffer

public void clearRingBuffer()
Discard the current contents of the Ring Buffer.

listAllRegisteredComponents

public java.lang.String[] listAllRegisteredComponents()
Return an array of Strings containing the fully qualified names of all individual components currently registered with Ras services.

listAllRegisteredGroups

public java.lang.String[] listAllRegisteredGroups()
Return an array of Strings containing the names of all Groups currently registered with Ras services.

listComponentsInGroup

public java.lang.String[] listComponentsInGroup(java.lang.String group)
Return an array of Strings containing the fully qualified names of all components who have registered as members of the specified group.
Parameters:
group - the complete name of the group.

getTracedComponents

public com.ibm.websphere.ras.TraceElementState[] getTracedComponents()
Return an array of TraceElementState objects containing information about the currently registered individual components for which some type of trace is currently enabled.

getTracedGroups

public com.ibm.websphere.ras.TraceElementState[] getTracedGroups()
Return an array of TraceElementState objects containing information about the currently registered Groups for which some type of trace is currently enabled.

getTraceSpecification

public java.lang.String getTraceSpecification(java.lang.String component)
Return the current trace specification for the specified component or group.
Parameters:
component - the String containing the name of the component or group.

processDumpString

public void processDumpString(java.lang.String dumpString)
Instruct dumpable components to write their current state.
Parameters:
dumpString - a String in the specified format to process or null.

checkTraceString

public void checkTraceString(java.lang.String traceString)
Check the specified trace string to see if it conforms to the TraceString grammar.
Parameters:
traceString - a String that complies to the TraceString grammar.

setTraceOutputToFile

public void setTraceOutputToFile(java.lang.String fileName, int rolloverSize, int numberBackups, java.lang.String traceFormat)
Make the specified file the active trace destination to which trace is routed. If trace is currently being routed to the ring buffer, the existing ring buffer is discarded. If trace is currently being routed to a file, the file will be closed and a new one opened. If the filename is the same as the name of the file currently in use, the results may be unpredictable.
Parameters:
fileName - a non-null String containing the fully-qualified name of a file. Ras must be able to create the directory if it does not exist and must have write access to the file.
rolloverSize - an int indicating the number of Megabytes at which the trace file should roll over to a new file. Caller must guarantee this is positive.
numberBackups - an integer indicating the number of backup files to maintain. The caller must guarantee this is positive.
traceFormat - a String indicating the trace format desired by the user. The String must be 'basic', 'advanced' or 'loganalyzer'. If an invalid value is specified, basic will be used.

setTraceOutputToRingBuffer

public void setTraceOutputToRingBuffer(int ringBufferSize, java.lang.String traceFormat)
Make the ring buffer the active trace destination to which trace is routed. If trace is currently being routed to the ring buffer, the existing ring buffer is simply resized. If trace is currently being routed to a file. the file will be closed and the listener that wraps it removed from the listener list.
Parameters:
ringBufferSize - an integer indicating the number of backup files to maintain. The caller must guarantee this is positive.
traceFormat - a String indicating the trace format desired by the user. The String must be 'basic', 'advanced' or 'loganalyzer'. If an invalid value is specified, basic will be used.

rolloverLogFileImmediate

public java.lang.String rolloverLogFileImmediate(java.lang.String streamName, java.lang.String fileName)
Immediately roll the log file for the specified stream and return the name of the archive file.
Parameters:
streamName - token that indicates which log file is to be rolled over. The caller must guarantee it is 'SystemOut' or 'SystemErr'.
fileName - the name of the file used to archive the contents of the current stream. May be null. If null is specified, the system will generate a file name.

Copyright IBM Corp. 1996-2003