How do i show the process thread information on linux?



  • Standard format.

     -e     Select all processes.  Identical to -A.
    -L     Show threads, possibly with LWP and NLWP columns.
    -f     Do full-format listing.
    
    When used with -L, the NLWP (number of threads) and LWP (thread ID) columns will be added.
    
    $ ps -eLf
    

    BSD Format

     a      Lift the BSD-style "only yourself" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like.  The set of processes selected in this manner is in addition to the set of processes selected by other means.  An alternate description is that this option causes ps to list all processes with a terminal (tty), or to list all processes when used together with the x option.
    
    
    x      Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like.  The set of processes selected in this manner is in addition to the set of processes selected by other means.  An alternate description is that this option causes ps to list all processes owned by you (same EUID as ps), or to list all processes when used together with the a option.
    
    m      Show threads after processes.
    s      Display signal format.
    
    $ ps axms
      UID   PID          PENDING          BLOCKED          IGNORED           CAUGHT STAT TTY        TIME COMMAND
    ...
    ...
       0     6 0000000000000000                -                -                - -    ?          0:00 [mm_percpu_wq]
            0     - 0000000000000000 0000000000000000 ffffffffffffffff 0000000000000000 S<   -          0:00 -
        
    ...
    ...
    

Log in to reply
 

© Lightnetics 2024