How in the container according to a port to determine the use of the port process is what?

For example:
Run the netstat -anp in the container found 9000 port has been enabled, I would like to find out what process is using the port.
When you execute netstat -anp directly on a virtual machine or physical machine, the last column in the result shows the process that occupies the port. But the last column in the container is empty.
Similarly, the use of lsof-i: 9000, in the virtual machine or physical machine is also able to draw the process, and the results returned in the empty container.
So how do you use the port in the container to determine the use of the port of the process is what? 2015-09-25 add comment share it

  • Weibo
  • QZONE
  • Micro letter

Did not find the relevant results

    Invited:

    Xiao Yao Yin – 80 after IT technology male

    We agreed from:


    Can you take a screenshot? I can see it in the container

      15:50:00 # netstat -tlnp 
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID / Program name
    Tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 37 / php-fpm
    Tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 26 / nginx
    Tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 8 / sshd
    Tcp 0 0 ::: 22 ::: * LISTEN 8 / sshd
    Root @ 62133dbd237a: /
    15:50:03 # lsof -i: 9000
    COMMAND PID USER FD TYPE DEVICE SIZE / OFF NODE NAME
    Php-fpm 37 root 6u IPv4 1657080944 0t0 TCP localhost: cslistener (LISTEN)
    Root @ 62133dbd237a: /

    Heads up! This alert needs your attention, but it's not super important.