Comment 7 for bug 1285929

Revision history for this message
Sergey Vasilenko (xenolog) wrote : Re: [Bug 1285929] Re: when neutron-dhcp-agent dies / moves dnsmasq is left running

On Sat, Mar 15, 2014 at 3:56 PM, Brad Durrow <email address hidden> wrote:

> Here is another way to calculate the processes id with network ports
> open (both servers and clients) in a namespace:
>
> [root@fuelpxe01 ~]# ssh node-16 ip netns exec
> qdhcp-50644057-b518-4e85-843a-3321c9a4073f lsof -i
> Warning: Permanently added 'node-16' (RSA) to the list of known hosts.
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> dnsmasq 9928 nobody 3u IPv4 2507813106 0t0 UDP *:bootps
> dnsmasq 9928 nobody 5u IPv4 2507813112 0t0 UDP 10.29.8.2:domain
> dnsmasq 9928 nobody 6u IPv4 2507813113 0t0 TCP 10.29.8.2:domain
> (LISTEN)
> dnsmasq 9928 nobody 7u IPv6 2507813114 0t0 UDP
> [fe80::f816:3eff:fe61:1b64]:domain
> dnsmasq 9928 nobody 8u IPv6 2507813115 0t0 TCP
> [fe80::f816:3eff:fe61:1b64]:domain (LISTEN)
>
> If you only wanted the process id you would add a -t
> [root@fuelpxe01 ~]# ssh node-16 ip netns exec
> qdhcp-50644057-b518-4e85-843a-3321c9a4073f lsof -i -t
> Warning: Permanently added 'node-16' (RSA) to the list of known hosts.
> 9928
>

Brad, big thanks for this way. I going to implement it.

/sv