Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

stackdiag (1)

Name

stackdiag - libstackdiag CLI for manual bug queries

Synopsis

/usr/bin/stackdiag [-l] [-n max-results] [-d stackDB-path]
     [-s] stack-resource

Description

stackdiag queries the stackDB database of known bugs by using libstackdiag and displays potential bugs (Oracle CRs). It takes a standardized string representation of a thread stack as input from a file, standard input, or as an operand.

The operand stack-resource tells stackdiag where to get the stack string from. If given a file path, the file is opened and its contents are assumed to be a stack string. If given "-", stackdiag reads the stack string from standard input until the EOF. If –s option is passed, stackdiag treats the operand itself as the stack string.

The stack string format is a sequence of frames, separated by a pipe character, where each frame looks like:

[module:]function[+offset][(arguments)]

This is a representation of a thread stack frame with module, function name, instruction offset, and function arguments as components. The module, offset, and argument parts are optional.

The argument part is a list of comma-separated hexadecimal integers representing pointers or integers passed, enclosed in a pair of parenthesis. Offset should be a hexadecimal number, with an optional 0x prefix. Whitespace is ignored everywhere. The last pipe in the stack string is optional.

Options

The following options are supported:

–n max results

The number following the –n option specifies the maximum number of potential bugs to output. The default is 5.

–d stackDB-path

The operand following the –d option specifies the location of the stackDB database file which stackdiag should use as the database to query. Default is /var/db/stackDB/stackDB.

–s

If passed, the operand stack-resource is assumed to be the stack string. Useful for manually entering stacks on the command line.

–l

Displays all results. Results are organized in groups if they are similar enough. By default, stackdiag only prints one result in each group.

Operands

The following operand is supported:

stack-resource

Path to the file containing the stack string. If "-", then standard input is used. If –s option is passed, then the operand is taken as the stack string.

Exit Status

0

Successful execution.

>0

An error occurred.

Examples

Example 1 Querying for bugs with the stack string Containing the Symbols "kadmin" and "uadmin", and Report a Maximum of 3 bugs
$ stackdiag -n 3 -s "kadmin | uadmin"
Example 2 Querying for bugs by Using a Different Stack Database, and the stack String Being Present in a File
$ stackdiag -d ./mystackDB ./panicstack.txt

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/fault-management/fault-management-utilities
CSI
Enabled
Interface Stability
Uncommitted
Standard
None

See Also

asr-notify(8), fmadm(8), smtp-notify(8), snmp-notify(8)