NAME
task - task_struct contents
SYNOPSIS
task [-R member[,member]] [pid | taskp] ...
DESCRIPTION
This command dumps a formatted display of the contents of a task_struct.
Multiple task or PID numbers may be entered; if no arguments are entered,
the task_struct of the current context is displayed. The -R option,
typically invoked indirectly via "foreach task", pares the output down
to one or more structure members.
pid a process PID.
taskp a hexadecimal task_struct pointer.
-R member a comma-separated list of one or more task_struct members.
EXAMPLES
Dump the task_struct structure of the current context:
crash> task
PID: 18138 TASK: c7d12000 CPU: 1 COMMAND: "crash"
struct task_struct {
state = 0,
flags = 0,
sigpending = 0,
addr_limit = {
seg = 3221225472
},
exec_domain = 0xc02386c0,
need_resched = 0,
counter = 2,
priority = 20,
avg_slice = 0,
has_cpu = 1,
processor = 1,
last_processor = 0,
lock_depth = 0,
next_task = 0xc7808000,
prev_task = 0xc6d1c000,
next_run = 0xc0252000,
prev_run = 0xc0252000,
binfmt = 0xc023abd0,
exit_code = 0,
exit_signal = 17,
.
.
.
files = 0xc09a7d60,
mm = 0xc753fb50,
sigmask_lock = {
lock = 0
},
sig = 0xc4745800,
signal = {
sig = {65536, 0}
},
blocked = {
sig = {65536, 0}
},
sigqueue = 0x0,
sigqueue_tail = 0xc7d124ac,
sas_ss_sp = 0,
sas_ss_size = 0
}
Display the ngroups and groups task_struct members for PID 2958:
crash> task -R ngroups,groups 2958
PID: 2958 TASK: c6718000 CPU: 0 COMMAND: "bash"
ngroups = 6,
groups = {504, 8, 9, 1000, 1007, 1006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
NOTE: When this command is invoked directly (i.e., not from "foreach"), it
is not necessary to include the "-R" before the task_struct member name(s).
|