[Crash-utility] [PATCH] display ST when using ps -l
Dave Anderson
anderson at redhat.com
Wed Mar 7 15:36:11 UTC 2012
----- Original Message -----
> Hello Dave,
>
> I was recommended to add the display of ST when using ps -l. Because it
> is simple, so I made the patch at first and then talk about the merit of
> patch with you.
>
> The display is like below:
>
> crash> ps -l
> [100126284069406] PID: 2389 TASK: ffff88047416aa80 ST:IN CPU: 12 COMMAND: "kondemand/12"
> [100126285814043] PID: 795 TASK: ffff880470cb3540 ST:UN CPU: 0 COMMAND: "jbd2/sda2-8"
> [100126284061076] PID: 2377 TASK: ffff88047426c100 ST:IN CPU: 0 COMMAND: "kondemand/0"
> [100126284058337] PID: 70050 TASK: ffff88045beaeac0 ST:RU CPU: 3 COMMAND: "crash"
> [100126285834369] PID: 70781 TASK: ffff88046929e100 ST:RU CPU: 0 COMMAND: "dd"
> ...
>
> I think "ps -l", which displays task sorted by last_run/timestamp, is
> concerning about the state of the task. Taking it into consideration, on
> a live system with original code, we use "ps -l" to show the sorted
> tasks at first, then use "ps" to display the state. The two pieces of
> information in such situation are not consonant. This is the reason why
> ST is needed.
Your patch is unacceptable as-is because it changes the task header display
for *all* context-specific commands, like "bt", "vm", "files", "task", etc.
But it does make sense that the task's timestamp and its state could
be correlated by "ps -l" output. Maybe something like this, with an
explanation in the ps help page?:
crash> ps -l
[100126284069406] [IN] PID: 2389 TASK: ffff88047416aa80 CPU: 12 COMMAND: "kondemand/12"
[100126285814043] [UN] PID: 795 TASK: ffff880470cb3540 CPU: 0 COMMAND: "jbd2/sda2-8"
[100126284061076] [IN] PID: 2377 TASK: ffff88047426c100 CPU: 0 COMMAND: "kondemand/0"
[100126284058337] [RU] PID: 70050 TASK: ffff88045beaeac0 CPU: 3 COMMAND: "crash"
[100126285834369] [RU] PID: 70781 TASK: ffff88046929e100 CPU: 0 COMMAND: "dd"
...
Dave
More information about the Crash-utility
mailing list