Solved What does the process with [] shown in ps mean?

Hello,

What does the process with [] shown in ps mean? And why are some processes without directories?

Thanks.
 
Kernel processes are printed in brackets.

If by "processes without directories" you mean entries, where full executable path is not visible, that might be due to: 1) change of a process' name with setproctitle(3) (more likely), or 2) omitted/incorrect path when executable were started with execl(3).
 
  • Thanks
Reactions: sdf
Thank you. Is there an internal command without a directory? Such as ps.
And why is there a - prefix in front of the shell's process? Such as -csh.
 
There are builtin(1)s, meaning commands, integrated in the shell, for example cd and echo. But I cannot tell if shell will create a sub-process when executing a built-in command or not; most likely not (apart from the case, where you execute such command in background, like ls / &).

I believe a leading dash means that this is a login shell.
 
  • Thanks
Reactions: sdf
Thank you very much.
And is sendmail also a kernel process? But it has neither [] nor a display path.
 
Sendmail is a 100% user space program, all it does is listen for incoming mail and handles it by either delivering it locally or forwarding it to an outside address.
 
As kpa said, sendmail(8) is a user-space program. The reason ps lists no path is that sendmail uses setproctitle(3) to label its processes; in this case process' name is appended at the end, in brackets; ps daxww | grep sendmail:
Code:
 1592  -  SsJ       1:16.86 |-- sendmail: accepting connections (sendmail)
 1595  -  IsJ       0:00.96 |-- sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
 2528  -  Ss        1:08.24 |-- sendmail: accepting connections (sendmail)
 2531  -  Is        0:00.95 |-- sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)

Another example, ps daxww | grep \(:
Code:
 1751  -  SsJ       2:29.27 |-- php-fpm: master process (/usr/local/etc/php-fpm.conf) (php-fpm)
 1752  -  IJ       23:47.79 | |-- php-fpm: pool www (php-fpm)
 1753  -  IJ       23:24.40 | |-- php-fpm: pool www (php-fpm)
16680  -  IJ       22:58.74 | `-- php-fpm: pool www (php-fpm)[/cmd]
 
  • Thanks
Reactions: sdf
Back
Top