set - set a process context or internal crash variable
set [[-a] [pid | taskp] | [-c cpu] | -p] | [crash_variable [setting]] | -v
This command either sets a new context, or gets the current context for
display. The context can be set by the use of:
pid a process PID.
taskp a hexadecimal task_struct pointer.
-a sets the pid or task as the active task on its cpu (dumpfiles only).
-c cpu sets the context to the active task on a cpu (dumpfiles only).
-p sets the context to the panic task, or back to the crash task on
a live system.
-v display the current state of internal crash variables.
If no argument is entered, the current context is displayed. The context
consists of the PID, the task pointer, the CPU, and task state. The task
state shows the bits found in both the task_struct state and exit_state
This command may also be used to set internal crash variables. If no value
argument is entered, the current value of the crash variable is shown. These
are the crash variables, acceptable arguments, and purpose:
scroll on | off controls output scrolling.
scroll less /usr/bin/less as the output scrolling program.
scroll more /bin/more as the output scrolling program.
scroll CRASHPAGER use CRASHPAGER environment variable as the
output scrolling program.
radix 10 | 16 sets output radix to 10 or 16.
refresh on | off controls internal task list refresh.
print_max number set maximum number of array elements to print.
console device-name sets debug console device.
debug number sets crash debug level.
core on | off if on, drops core when the next error message
hash on | off controls internal list verification.
silent on | off turns off initialization messages; turns off
crash prompt during input file execution.
(scrolling is turned off if silent is on)
edit vi | emacs set line editing mode (from .crashrc file only).
namelist filename name of kernel (from .crashrc file only).
zero_excluded on | off controls whether excluded pages, or pages that
are missing from an incomplete dumpfile, should
return zero-filled memory when read.
null-stop on | off if on, gdb's printing of character arrays will
stop at the first NULL encountered.
gdb on | off if on, the crash session will be run in a mode
where all commands will be passed directly to
gdb, and the command prompt will change to
"gdb>"; when running in this mode, native crash
commands may be executed by preceding them with
the "crash" directive.
scope text-addr sets the text scope for viewing the definition
of data structures; the "text-addr" argument
must be a kernel or module text address, which
may be expressed symbolically or as a hexadecimal
offline show | hide Show or hide command output that is associated
with offline cpus.
Internal variables may be set in four manners:
1. entering the set command in $HOME/.crashrc.
2. entering the set command in .crashrc in the current directory.
3. executing an input file containing the set command.
4. during runtime with this command.
During initialization, $HOME/.crashrc is read first, followed by the
.crashrc file in the current directory. Set commands in the .crashrc file
in the current directory override those in $HOME/.crashrc. Set commands
entered with this command or by runtime input file override those
defined in either .crashrc file. Multiple set command arguments or argument
pairs may be entered in one command line.
Set the current context to task c2fe8000:
crash> set c2fe8000
Set the context back to the panicking task:
crash> set -p
STATE: TASK_RUNNING (PANIC)
Turn off output scrolling:
crash> set scroll off
scroll: off (/usr/bin/less)
Show the current state of crash internal variables:
crash> set -v
scroll: on (/usr/bin/less)
radix: 10 (decimal)
scope: (not set)
Show the current context: