Home Explore Blog CI



man-pages

8th chunk of `ps.man`
170164448b603660993d6a8d4a9c32e81700b01bf56a072b0000000100000fb7
  The section argument can be one of simple,
              list,  output,  threads,  misc,  or  all.   The  argument  can be
              shortened to one of the underlined letters as in: s|l|o|t|m|a.

       --info Print debugging info.

       L      List all format specifiers.

       V      Print the procps‐ng version.

       -V     Print the procps‐ng version.

       --version
              Print the procps‐ng version.

NOTES
       This ps works by reading the virtual files in /proc.  This ps  does  not
       need  to be setuid kmem or have any privileges to run.  Do not give this
       ps any special permissions.

       CPU usage is currently expressed as the percentage of time spent running
       during the entire lifetime of a process.  This is not ideal, and it does
       not conform to the standards that ps otherwise conforms to.   CPU  usage
       is unlikely to add up to exactly 100%.

       The  SIZE  and  RSS fields don’t count some parts of a process including
       the  page  tables,  kernel  stack,  struct   thread_info,   and   struct
       task_struct.   This  is usually at least 20 KiB of memory that is always
       resident.  SIZE is the virtual size of the process (code+data+stack).

       Processes marked <defunct> are dead processes (so-called "zombies") that
       remain because their parent has  not  destroyed  them  properly.   These
       processes will be destroyed by init(8) if the parent process exits.

       If  the  length of the username is greater than the width of the display
       column, the username will be truncated.  See the -o  and  -O  formatting
       options to customize length.

       Commands  options  such  as  ps  -aux  are  not  recommended  as it is a
       confusion of two different standards.  According to the POSIX  and  UNIX
       standards,  the  above  command asks to display all processes with a TTY
       (generally the commands users are running) plus all processes owned by a
       user named x.  If that user doesn’t  exist,  then  ps  will  assume  you
       really meant ps aux.

PROCESS FLAGS
       The  sum  of  these  values  is  displayed  in  the "F" column, which is
       provided by the flags output specifier:

               1    forked but didn’t exec
               4    used super-user privileges

PROCESS STATE CODES
       Here  are  the  different  values  that  the  s, stat and state   output
       specifiers  (header "STAT" or "S") will display to describe the state of
       a process:

               D    uninterruptible sleep (usually IO)
               I    Idle kernel thread
               R    running or runnable (on run queue)
               S    interruptible sleep (waiting for an event to complete)
               T    stopped by job control signal
               t    stopped by debugger during the tracing
               W    paging (not valid since the 2.6.xx kernel)
               X    dead (should never be seen)
               Z    defunct ("zombie") process, terminated but  not  reaped  by
                    its parent

       For BSD formats and when the stat keyword is used, additional characters
       may be displayed:

               <    high-priority (not nice to other users)
               N    low-priority (nice to other users)
               L    has pages locked into memory (for real-time and custom IO)
               s    is a session leader
               l    is  multi‐threaded  (using CLONE_THREAD, like NPTL pthreads
                    do)
               +    is in the foreground process group

OBSOLETE SORT KEYS
       These keys are used by the BSD O option (when it is used  for  sorting).
       The  GNU  --sort  option  doesn’t  use  these  keys,  but the specifiers
       described below in the STANDARD FORMAT SPECIFIERS  section.   Note  that
       the  values  used in sorting are the internal values ps uses and not the
       "cooked" values used in some of the output format fields (e.g.   sorting

Title: ps - Additional Information, Notes, and Process State Codes
Summary
This section provides additional details about the `ps` command. It explains how to get debugging information, list format specifiers, and display the version. It includes notes on how `ps` works by reading virtual files and handling CPU usage calculations. It describes what the SIZE and RSS fields include. It also explains defunct processes, username truncation, and recommends against using commands like `ps -aux` due to potential confusion. Finally, it lists process flags, state codes, and obsolete sort keys used by the BSD O option.