On my machine (Debian testing), when I do
ps aux | grep pam
I obtain
orto 609 0.0 0.0 58532 2148 ? S 08:06 0:00 (sd-pam)
orto 5533 0.0 0.0 12724 1948 pts/1 S+ 16:51 0:00 grep pam
(sd-pam)
seems a strange name for a process. Reading this forum, I see that this name is set on purpose by systemd. In the source code we see
/* The child's job is to reset the PAM session on
* termination */
/* This string must fit in 10 chars (i.e. the length
* of "/sbin/init"), to look pretty in /bin/ps */
rename_process("(sd-pam)");
What does it mean look pretty in /bin/ps
and why to choose (sd-pam)
and not just sd-pam
as a name? Putting parenthesis around the name seems indicate that this process has something special like for a kernel thread e.g. [kintegrityd]
.
Best Answer
There are two cases:
(...)
See https://lists.freedesktop.org/archives/systemd-devel/2016-April/036322.html
(sd-pam)
is the special case