Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #178742
| From | Clark Wang <dearvoid@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Why 2 dhclient processes running for eth0 (IPv4)? |
| Date | 2017-03-13 06:10 +0100 |
| Message-ID | <tkqp4-3Rm-9@gated-at.bofh.it> (permalink) |
| References | <tiEcN-38Q-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
2017-03-08 15:24 GMT+08:00 Clark Wang <dearvoid@gmail.com>:
> See following output from my system (Debian 8.6):
>
> root@debian:~# cat /etc/debian_version
> 8.6
> root@debian:~# pgrep -af dhc
> 506 dhclient -v -pf /run/dhclient.eth1.pid -lf
> /var/lib/dhcp/dhclient.eth1.leases eth1
> 447 dhclient -v -pf /run/dhclient.eth0.pid -lf
> /var/lib/dhcp/dhclient.eth0.leases eth0
> 601 dhclient -v -pf /run/dhclient.eth0.pid -lf
> /var/lib/dhcp/dhclient.eth0.leases eth0
> 664 dhclient -6 -pf /run/dhclient6.eth0.pid -lf
> /var/lib/dhcp/dhclient6.eth0.leases eth0
> root@debian:~# grep -n -C3 eth0 /etc/network/interfaces
> 7-auto lo
> 8-iface lo inet loopback
> 9-
> 10:allow-hotplug eth0
> 11:iface eth0 inet dhcp
> 12:iface eth0 inet6 dhcp
> 13- accept_ra 1
> 14-
> 15-allow-hotplug eth1
> root@debian:~#
>
> There are 2 `dhclient` processes running for `eth0` (IPv4). Rebooting does
> not help for me.
>
Thanks all for pointing me to the debug direction.
I moved /sbin/dhclient to /sbin/dhclient.bin and rewrite /sbin/dhclient as
a shell script which would call /sbin/dhclient.bin and prints some proc
hierarchy info. It turned out both /etc/init.d/networking and systemd would
call ifup. See following example (only for IPv4):
==== Sun Mar 12 21:38:08 PDT 2017 ====
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 433 0.0 1.1 20052 2880 ? S 21:38 0:00 /bin/bash
/sbin/dhclient -v -pf /run/dhclient.eth0.pid -lf
/var/lib/dhcp/dhclient.eth0.leases eth0
systemd(1)-+-networking(285)---ifup(427)---sh(432)---dhclient(433)---pstree(441)
|-systemd-journal(160)
`-systemd-udevd(164)-+-systemd-udevd(167)
|-systemd-udevd(171)
|-systemd-udevd(172)
|-systemd-udevd(173)
|-systemd-udevd(174)
|-systemd-udevd(175)
|-systemd-udevd(176)
|-systemd-udevd(177)
|-systemd-udevd(178)
`-systemd-udevd(179)
==== Sun Mar 12 21:38:10 PDT 2017 ====
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 518 0.0 1.1 20052 2920 ? S 21:38 0:00 /bin/bash
/sbin/dhclient -v -pf /run/dhclient.eth0.pid -lf
/var/lib/dhcp/dhclient.eth0.leases eth0
systemd(1)-+-dhclient.bin(457)
|-ifup(509)---sh(517)---dhclient(518)---pstree(522)
|-nfs-common(512)---nfs-common(523)
|-systemd-journal(160)
`-systemd-udevd(164)-+-systemd-udevd(167)
|-systemd-udevd(171)
|-systemd-udevd(172)
|-systemd-udevd(173)
|-systemd-udevd(174)
|-systemd-udevd(175)
|-systemd-udevd(176)
|-systemd-udevd(177)
|-systemd-udevd(178)
`-systemd-udevd(179)
I know nothing about systemd so I disabled the "networking" service with
"sysv-rc-conf" but then network would not be up after reboot. So how can I
make sure only "systemd" or the "networking" service would bring network up?
-clark
Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread
Why 2 dhclient processes running for eth0 (IPv4)? Clark Wang <dearvoid@gmail.com> - 2017-03-08 08:30 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Clark Wang <dearvoid@gmail.com> - 2017-03-10 12:00 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? <tomas@tuxteam.de> - 2017-03-10 12:40 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? <tomas@tuxteam.de> - 2017-03-10 14:40 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-03-10 14:40 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? <tomas@tuxteam.de> - 2017-03-10 14:30 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Jonathan Dowland <jmtd@debian.org> - 2017-03-10 14:30 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Clark Wang <dearvoid@gmail.com> - 2017-03-13 06:10 +0100
csiph-web