I want to know which thread is the busiest one. but on the redhat9 the 'top' or 'ps' could only tell me the pid of differnce thread. and in the code I can got thread id only. I can't figure the mapping among them.
the follow is the output of 'ps -C npserver -m -o pid,tid,pcpu,tname,stat,psr,cmd'
Code:
PID TID %CPU TTY STAT PSR CMD
15489 - 0.1 ? S - /usr/local/bin/npserver
15490 - 0.0 ? S - /usr/local/bin/npserver
15492 - 0.0 ? S - /usr/local/bin/npserver
15493 - 0.0 ? S - /usr/local/bin/npserver
15494 - 0.0 ? S - /usr/local/bin/npserver
15495 - 0.0 ? S - /usr/local/bin/npserver
15496 - 0.0 ? S - /usr/local/bin/npserver
15497 - 0.0 ? S - /usr/local/bin/npserver
15498 - 0.0 ? S - /usr/local/bin/npserver
on Redhat AS4, I got the following output
Code:
PID TID %CPU TTY STAT PSR CMD
14470 - 0.0 ? - - /usr/local/bin/npserver
- 14470 0.0 - Sl 0 -
- 14471 0.0 - Sl 0 -
- 14472 0.0 - Sl 0 -
- 14473 0.0 - Sl 0 -
- 14474 0.0 - Sl 0 -
- 14475 0.1 - Sl 0 -
- 14476 0.0 - Sl 0 -
- 14477 0.0 - Sl 0 -
- 14478 0.0 - Sl 0 -
- 14480 0.0 - Sl 0 -