On Fri, Sep 29, 2006 at 01:39:49PM -0400, Dave Anderson wrote:
Guy Streeter wrote:
> How can I find out what other tasks are threads of (or with) a given
> task?
>
> --Guy
There's no direct command to do it. But, for example,
all threads of a task should have the same name and the
same task->tgid right?
All threads of a process will be in the task_struct->thread_group list
of the process' group_leader. Wouldn't that be easier/faster to do?
Ananth
So for example, I just executed a task named "mkthreads", pid 27610,
which in turn creates 10 threads of itself, all of which will have
the same task->tgid:
crash> foreach mkthreads task | grep -e COMMAND -e tgid
PID: 27610 TASK: ddb2c000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27611 TASK: c82de000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27612 TASK: d016a000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27613 TASK: c3f2e000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27614 TASK: db95e000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27615 TASK: d6dfa000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27616 TASK: ddad6000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27617 TASK: cd1a4000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27618 TASK: d45de000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27619 TASK: cef58000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
PID: 27620 TASK: cdc38000 CPU: 0 COMMAND: "mkthreads"
tgid = 27610,
crash>
Dave
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility