For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > What Does This Program Have Open

What Does This Program Have Open

Created by dave. Last edited by dave, 9 years and 263 days ago. Viewed 2,853 times. #1
[edit] [rdf]
labels
attachments

How do I list what ports and files a process has open?

# lsof -p 16329
COMMAND   PID  USER   FD   TYPE     DEVICE    SIZE     NODE NAME
squid   16329 squid  cwd    DIR      253,0    4096 90245853 /var/spool/squid
squid   16329 squid  rtd    DIR      253,0    4096        2 /
squid   16329 squid  txt    REG      253,0  838212 43614284 /usr/sbin/squid
squid   16329 squid  mem    REG      253,0  206380 33325228 /lib/libm-2.5.so
squid   16329 squid  mem    REG      253,0   99660 33325095 /lib/libnsl-2.5.so
squid   16329 squid  mem    REG      253,0  242880 33325133 /lib/libsepol.so.1
squid   16329 squid  mem    REG      253,0   43544 33325081 /lib/libcrypt-2.5.so
squid   16329 squid  mem    REG      253,0 1603392 33325077 /lib/libc-2.5.so
squid   16329 squid  mem    REG      253,0   46680 33325258 /lib/libnss_files-2.5.so
squid   16329 squid  mem    REG      253,0  600788 73486047 /usr/lib/libkrb5.so.3.3
squid   16329 squid  mem    REG      253,0  157304 73486045 /usr/lib/libk5crypto.so.3.1
squid   16329 squid  mem    REG      253,0 1242192 33325138 /lib/libcrypto.so.0.9.8b
squid   16329 squid  mem    REG      253,0  124432 33325084 /lib/ld-2.5.so
squid   16329 squid  mem    REG      253,0   14644 33325226 /lib/libdl-2.5.so
squid   16329 squid  mem    REG      253,0   42048 33325288 /lib/librt-2.5.so
squid   16329 squid  mem    REG      253,0   74616 33325103 /lib/libresolv-2.5.so
squid   16329 squid  mem    REG      253,0  123596 33325101 /lib/libpthread-2.5.so
squid   16329 squid  mem    REG      253,0   93508 33325135 /lib/libselinux.so.1
squid   16329 squid  mem    REG      253,0    7880 33325126 /lib/libkeyutils-1.2.so
squid   16329 squid  mem    REG      253,0    7748 33325136 /lib/libcom_err.so.2.1
squid   16329 squid  mem    REG      253,0   75028 73476507 /usr/lib/libz.so.1.2.3
squid   16329 squid  mem    REG      253,0   33680 73484837 /usr/lib/libkrb5support.so.0.1
squid   16329 squid  mem    REG      253,0  190712 73486055 /usr/lib/libgssapi_krb5.so.2.2
squid   16329 squid  mem    REG      253,0  281116 33325140 /lib/libssl.so.0.9.8b
squid   16329 squid    0u   CHR        1,3             1315 /dev/null
squid   16329 squid    1u   CHR        1,3             1315 /dev/null
squid   16329 squid    2u   CHR        1,3             1315 /dev/null
squid   16329 squid    3u  unix 0xedbc8c80            65790 socket
squid   16329 squid    4r  0000       0,10       0    65795 eventpoll
squid   16329 squid    5u   REG      253,0    5555 90246346 /var/log/squid/cache.log
squid   16329 squid    6u  IPv4      65796              UDP *:60415
squid   16329 squid    7w   REG      253,0   18301 90246350 /var/log/squid/access.log
squid   16329 squid    8r  FIFO        0,6            65797 pipe
squid   16329 squid    9w   REG      253,0   22167 90246351 /var/log/squid/store.log
squid   16329 squid   10w   REG      253,0    2640 90246352 /var/spool/squid/swap.state
squid   16329 squid   11w  FIFO        0,6            65798 pipe
squid   16329 squid   13u  IPv4      65800              TCP *:squid (LISTEN)
squid   16329 squid   14u  IPv4      65801              UDP *:icpv2
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt