LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   is the port open or not ?? (https://www.linuxquestions.org/questions/linux-server-73/is-the-port-open-or-not-4175449979/)

mohammad alsharqi 02-13-2013 04:22 PM

Quote:

Originally Posted by ncdmr (Post 4890988)
Hi, as root, issue 'lsof -i:9100' (note the adjacent : & the port, no space!). Will return the process that spawned the port.

From there, use - again as root - 'lsof -p <process>'. It will give you the list of all file(handler)s involved.

hth.

i am apply this command lsof -p 1139(1139 which is the pid) and get :
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 1139 proxy cwd DIR 251,0 4096 28708655 /var/spool/videocache/youporn
python 1139 proxy rtd DIR 251,0 4096 2 /
python 1139 proxy txt REG 251,0 2292496 28316810 /usr/bin/python2.6
python 1139 proxy mem REG 251,0 2034236 28317017 /usr/lib/libmysqlclient_r.so.16.0.0
python 1139 proxy mem REG 251,0 71432 22806546 /lib/tls/i686/cmov/libresolv-2.11.1.so
python 1139 proxy mem REG 251,0 22036 22806551 /lib/tls/i686/cmov/libnss_dns-2.11.1.so
python 1139 proxy mem REG 251,0 120368 22806795 /lib/libgcc_s.so.1
python 1139 proxy mem REG 251,0 9632 395182 /usr/lib/pyshared/python2.6/netifaces.so
python 1139 proxy mem REG 251,0 108196 28318727 /usr/lib/python2.6/lib-dynload/_ctypes.so
python 1139 proxy mem REG 251,0 197540 28318730 /usr/lib/python2.6/lib-dynload/pyexpat.so
python 1139 proxy mem REG 251,0 38360 22806550 /lib/tls/i686/cmov/libcrypt-2.11.1.so
python 1139 proxy mem REG 251,0 117364 28449183 /usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.4c1-py2.6-linux-i686.egg/_mysql.so
python 1139 proxy mem REG 251,0 71988 28320571 /usr/lib/python2.6/lib-dynload/datetime.so
python 1139 proxy mem REG 251,0 42572 22806557 /lib/tls/i686/cmov/libnss_files-2.11.1.so
python 1139 proxy mem REG 251,0 34408 22806540 /lib/tls/i686/cmov/libnss_nis-2.11.1.so
python 1139 proxy mem REG 251,0 79676 22806545 /lib/tls/i686/cmov/libnsl-2.11.1.so
python 1139 proxy mem REG 251,0 30496 22806559 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
python 1139 proxy mem REG 251,0 1430084 22806564 /lib/tls/i686/cmov/libc-2.11.1.so
python 1139 proxy mem REG 251,0 149392 22806558 /lib/tls/i686/cmov/libm-2.11.1.so
python 1139 proxy mem REG 251,0 79512 22806774 /lib/libz.so.1.2.3.3
python 1139 proxy mem REG 251,0 1364764 22806672 /lib/i686/cmov/libcrypto.so.0.9.8
python 1139 proxy mem REG 251,0 294672 22806670 /lib/i686/cmov/libssl.so.0.9.8
python 1139 proxy mem REG 251,0 9748 22806563 /lib/tls/i686/cmov/libutil-2.11.1.so
python 1139 proxy mem REG 251,0 9736 22806556 /lib/tls/i686/cmov/libdl-2.11.1.so
python 1139 proxy mem REG 251,0 117086 22806554 /lib/tls/i686/cmov/libpthread-2.11.1.so
python 1139 proxy mem REG 251,0 16752 28323397 /usr/lib/python2.6/lib-dynload/_heapq.so
python 1139 proxy mem REG 251,0 113964 22810283 /lib/ld-2.11.1.so
python 1139 proxy 0r CHR 1,3 0t0 924 /dev/null
python 1139 proxy 1u CHR 1,3 0t0 924 /dev/null
python 1139 proxy 2u CHR 1,3 0t0 924 /dev/null
python 1139 proxy 3r CHR 1,3 0t0 924 /dev/null
python 1139 proxy 4u CHR 1,3 0t0 924 /dev/null
python 1139 proxy 5u CHR 1,3 0t0 924 /dev/null
python 1139 proxy 6w REG 251,0 1465771 28580025 /var/log/videocache/videocache.log
python 1139 proxy 7w REG 251,0 539715 28580028 /var/log/videocache/scheduler.log
python 1139 proxy 8w REG 251,0 1704431 28580034 /var/log/videocache/trace.log
python 1139 proxy 9w REG 251,0 0 28580037 /var/log/videocache/cleaner.log
python 1139 proxy 10u IPv4 5041 0t0 TCP localhost:9100 (LISTEN)
python 1139 proxy 13r REG 251,0 9799233 28708481 /var/log/squid/store.log


thanks for replay


All times are GMT -5. The time now is 04:33 PM.