stackdiag - libstackdiag CLI for manual bug queries
/usr/bin/stackdiag [-l] [-n max-results] [-d stackDB-path] [-s] stack-resource
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:
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.
The following options are supported:
The number following the –n option specifies the maximum number of potential bugs to output. The default is 5.
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.
If passed, the operand stack-resource is assumed to be the stack string. Useful for manually entering stacks on the command line.
Displays all results. Results are organized in groups if they are similar enough. By default, stackdiag only prints one result in each group.
The following operand is supported:
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.
An error occurred.
$ 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
See attributes(7) for descriptions of the following attributes: