Thursday, July 9, 2009

Display threads in Linux

ps man page has the following information

To get info about threads:
ps -eLf
ps axms

When I tried "ps -eLf" in my machine, a portion of the output is

UID PID PPID LWP C NLWP STIME TTY TIME CMD
pratheep 3386 3364 3386 7 6 12:40 ? 00:00:55 /usr/lib/firefox-3.0.11/firefox
pratheep 3386 3364 3389 0 6 12:40 ? 00:00:00 /usr/lib/firefox-3.0.11/firefox
pratheep 3386 3364 3393 0 6 12:40 ? 00:00:02 /usr/lib/firefox-3.0.11/firefox
pratheep 3386 3364 3423 0 6 12:40 ? 00:00:00 /usr/lib/firefox-3.0.11/firefox
pratheep 3386 3364 3424 0 6 12:40 ? 00:00:00 /usr/lib/firefox-3.0.11/firefox
pratheep 3386 3364 3425 0 6 12:40 ? 00:00:00 /usr/lib/firefox-3.0.11/firefox
pratheep 3396 3137 3396 0 2 12:40 ? 00:00:00 kdeinit4: kio_http [kd up
pratheep 3396 3137 3409 0 2 12:40 ? 00:00:00 kdeinit4: kio_http [kd up
pratheep 3398 3137 3398 0 2 12:40 ? 00:00:00 kdeinit4: kio_http [kd up
pratheep 3398 3137 3408 0 2 12:40 ? 00:00:00 kdeinit4: kio_http [kd up


LWP - lwp (light weight process, or thread) ID of the lwp being reported.
NLWP - number of lwps (threads) in the process.
C - processor utilization. Currently, this is the integer value of the percent usage over the lifetime of the process.

No comments:

Post a Comment