Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Why there are some duplicate processes in this fresh installed Debian 7?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Why there are some duplicate processes in this fresh installed Debian 7?

jrdaijrdai Member

ps -A

PID TTY TIME CMD
1 ? 00:00:00 init
2 ? 00:00:00 kthreadd/7622
3 ? 00:00:00 khelper/7622
87 ? 00:00:00 upstart-udev-br
98 ? 00:00:00 udevd
141 ? 00:00:00 udevd
143 ? 00:00:00 udevd
236 ? 00:00:00 upstart-socket-
1529 ? 00:00:00 rsyslogd
1574 ? 00:00:00 saslauthd
1576 ? 00:00:00 saslauthd
1641 ? 00:00:00 xinetd
1674 ? 00:00:00 apache2
1677 ? 00:00:00 apache2
1718 ? 00:00:00 cron
1748 ? 00:00:00 sshd
1750 pts/0 00:00:00 bash
1818 ? 00:00:00 sshd
1836 pts/0 00:00:00 ps

netstat -ntpl

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1818/sshd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1674/apache2

I don't understand why there are 3 udevd, 2 sshd, and 2 saslauthd, 2 apache2?

At first, I thought sshd is listenning to both IPv4 and IPv6, so I turn it IPv4 only, but still, there are two processes. Forgive me if this is a dummy question, I am kinda noob.

Comments

  • These are most probably forked processes.

  • nunimnunim Member
    edited March 2014

    Apache runs as more than one process by default.

    You can set the number of servers launched at startup by editing StartServers in the httpd.conf.

    Thanked by 1jrdai
  • sshd uses privilege separation by default, so you'll see 2 sshd processes for each ssh connection (plus the original sshd daemon process that listens for new ssh connections).

    udevd spawns worker threads on startup (in a similar way to apache workers).

    you might find the output of pstree -aplu more instructive - it's more visual and shows the relationship and user transitions of processes

    Thanked by 1jrdai
Sign In or Register to comment.