Command-line interface reference for problem determination

Use the command-line interface to access problem determination and diagnostic information.

Diagnostics object

Returns the Diagnostics object representing the diagnostic package for the system.

Help is available on the command-line interface for the Diagnostics object. To get help, pass the Diagnostics object as an argument to the help() function, as shown in the following example:
>>> help(deployer.diagnostics)
The Diagnostics object has two methods, the get method, and the getLatest method. The get method downloads the diagnostic package as a compressed file. This method takes an optional path where the file is stored; the default path is ./trace.zip, as shown in the following examples:
>>> deployer.diagnostics.get()
>>> deployer.diagnostics.get('/some/path/diagnostics.zip')
The getLatest method downloads a diagnostic package as a compressed file that only contains the latest version of the diagnostic files. By using this method, you can obtain a diagnostic package that contains only the latest information and has a much smaller file size. This method takes an optional path where the file is stored; the default path is ./trace.zip, as shown in the following examples:
>>> deployer.diagnostics.getLatest()
>>> deployer.diagnostics.getLatest('/some/path/diagnostics.zip')

Trace object

The Trace object returns a TraceFile object representing the running trace file on the system.

Help is available for the Trace object on the command-line interface. To get help, pass the Trace object as an argument to the help() function, as shown in the following example:
>>> help(deployer.trace)

Trace methods

The Trace object has the following methods:
add
Adds a logger and optional log level to the trace file specification. Logger names use Java™ package name syntax and log levels are one of the following values:
  • OFF
  • SEVERE
  • WARNING
  • CONFIG
  • INFO
  • FINE
  • FINER
  • FINEST
The default value is OFF. The add method is shown in the following examples:
>>> deployer.trace.add('com.ibm.ws.deployer', 'FINE')
>>> deployer.trace.add('com.ibm.ws.deployer.not.interested')
remove
Removes an existing logger from the trace file specification. Logger names use Java package name syntax, as shown in the following example:
>>> deployer.trace.remove('com.ibm.ws.deployer.not.interested')
set
Sets the log level for an existing logger in the trace file specification. Logger names use Java package name syntax and log levels are one of the following values:
  • OFF
  • SEVERE
  • WARNING
  • CONFIG
  • INFO
  • FINE
  • FINER
  • FINEST
The set method is shown in the following examples:
>>> deployer.trace.set('com.ibm.ws.deployer', 'FINE')
>>> deployer.trace.set('com.ibm.ws.deployer', 'SEVERE')
spec
Returns a map with the trace file specification for the system. The map has key-value pairs in which the key is the package name and the value is the log level.
tail
Prints the last <n> lines of the file, where <n> is an integer, as shown in the following example:
>>> deployer.trace.tail()
>>> deployer.errors.tail(100)
The default value is 10 (ten).

Errors object

The Errors object returns an ErrorFile object representing the running error file on the system.

Help is available for the Errors object on the command-line interface. To get help, pass the Errors object as an argument to the help() function, as shown in the following example:
>>> help(deployer.errors)
The Errors object has one method, the tail method. The tail method prints the last <n> lines of the file, in which <n> is an integer. The tail method is shown in the following example:
>>> deployer.trace.tail()
>>> deployer.errors.tail(100)
The default value is 10 (ten).