streamtool getlog

The streamtool getlog command saves log and trace files for an IBM® Streams instance.

Usage

getlog

Read syntax diagramSkip visual syntax diagram--log--includeapps--services, service--resources, resourceId--tags, tag-f--filefile-name--collection-directorycollection-directory--appendtimestamp-U--Useruserid-h--help--tracelevel-v--verboselevel

Authority

To get log or trace data for an instance, you must have read authority for the system-log instance object.

To get log or trace data for jobs, you must have read authority for the system-log instance object and the application-log instance object.

By default, the InstanceAdministrator role has this authority.

For more information, see streamtool getacl.

Description

Use streamtool getlog to access log and trace files for an IBM Streams instance. This command also collects the following system information:
  • OS logs:
    • var/log/messages (only the most current)
    • var/log/demsg
  • ps: a list of active processes
  • netstat: network status
  • rpm: a list of rpms installed
The streamtool getlog command also collects the information that you get when you run the following streamtool commands:
  • streamtool lspes
  • streamtool getresourcestate --long

By default, the streamtool getlog command saves log and trace data in the StreamsLogs.tgz file. To specify a different file name, use the --file option.

By default, IBM Streams collects the log and trace data for every resource in the instance. Use the following options to restrict the amount of log and trace data:
  • Log data: For log data only, use the --log option.
  • Trace data: To include application trace data, use the --includeapps option.
If you do not specify the --log or --includeapps option, the streamtool getlog command collects the following data by default:
  • If you are collecting data for the instance or a set of resources, both trace and log data.
  • If you are collecting data for a runtime service, application job, or PE, trace data only.

Options and arguments

--appendtimestamp
Specifies to append a time stamp to the file name.
--collection-directory <collection-directory>
Specifies the directory that is used for storing temporary copies of intermediate log collection results. If you do not specify this command option, the instance log path is used for temporary storage.
-f, --file <file-name>
Specifies the file path that the command uses to store the compressed tar file output. By default, the following file is created in the current working directory: StreamsLogs.tgz.
-h, --help
Specifies to show the command syntax.
--includeapps
Specifies to include the application trace data in the log file.
--log
Specifies to collect only the administration log file. The administration log file contains the log data for the applications that are running in the instance. It also contains log data for the instance services.
--resources <resourceID>
Specifies a list of resource identifiers. The resource identifiers are delimited by commas.
--services <services>
Specifies to retrieve logs for the specified services. The following service names are valid:
  • aas
  • app
  • auditlog
  • jmx
  • sam
  • srm
  • sws
  • view
--tags <tag>
Specifies to retrieve logs only from resources that are configured with the specified tags.
--trace <level>
Specifies the trace setting. The following valid levels are listed in order of increasing verbosity, which is to say that the first level in the list generates the least amount of information:
  • off
  • error
  • warn
  • info
  • debug
  • trace
The default value is off.
-U, --User <userid>
Specifies an IBM Streams user ID that has authority to run the command.
-v,--verbose <level>
Specifies to provide more detailed command output. The verbosity level can be 0-3, where 0 disables detailed reporting and each increment provides more detailed output.