Process Command – Explain Output of ps -ef Command

commandcontrolling-terminalprocessps

A part of the output from the ps -ef command is given below :

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0  2012 ?        00:00:01 init [3]         
root         2     1  0  2012 ?        00:00:01 [migration/0]
root         3     1  0  2012 ?        00:00:00 [ksoftirqd/0]
root         4     1  0  2012 ?        00:00:00 [watchdog/0]
root         5     1  0  2012 ?        00:00:00 [events/0]
root         6     1  0  2012 ?        00:00:00 [khelper]
root         7     1  0  2012 ?        00:00:00 [kthread]
root         9     7  0  2012 ?        00:00:00 [xenwatch]
root        10     7  0  2012 ?        00:00:00 [xenbus]
root        18     7  0  2012 ?        00:00:01 [migration/1]
root        19     7  0  2012 ?        00:00:00 [ksoftirqd/1]

What does the "?" for all the rows in the TTY column mean? Also what does C and CMD column stand for?

Best Answer

You can check the manpage using man ps to find out what the columns mean. The Linux ps manpage, for example, gives:

c              C           integer value of the processor utilisation percentage.
                           (see %cpu)
tname          TTY         controlling tty (terminal). (alias tt, tty).
args           COMMAND     command with all its arguments as a string. May chop as
                           desired. Modifications to the arguments are not shown.
                           The output in this column may contain spaces.
                           (alias cmd, command)
cmd            CMD         see args. (alias args, command)

If the TTY is ? that means that the process is not associated with any user terminal.

Related Question