From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f48cfc8803e56134,start X-Google-Attributes: gidfee84,public From: Pit Linnartz from Compaq Subject: Re: lsof/ofiles/PCB question: Date: 1999/09/07 Message-ID: <37D5032B.A997E1DA@software-ag.de>#1/1 X-Deja-AN: 522071963 Content-Transfer-Encoding: 7bit References: <7r0iai$53p@eliot.oit.umass.edu> X-Accept-Language: en X-Server-Date: 7 Sep 1999 12:20:59 GMT Content-Type: text/plain; charset=us-ascii Organization: Compaq Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Try to obtain a more recent version of lsof, it should offer the info you're requesting. Pit # lsof -i | grep LISTEN portmap 332 root 5u inet 0x3423c900 0t0 TCP *:111 (LISTEN) mountd 334 root 6u inet 0xe7a5ef00 0t0 TCP *:940 (LISTEN) nfsd 336 root 4u inet 0x3423d000 0t0 TCP *:2049 (LISTEN) rpc.pcnfs 340 root 4u inet 0x3423ca00 0t0 TCP *:945 (LISTEN) # lsof -v lsof version information: revision: 4.22 -- find the latest revision at: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof constructed: Mon Jan 19 21:01:27 MET 1998 constructed by and on: compiler: cc compiler flags: -g -DDUV=40000 -DADVFSV=400 -DHASTAGTOPATH -I/usr/include -I/usr/sys/ALF7 -I/usr/sys/include loader flags: -L./lib -llsof -lmld -lmsfs system info: OSF1 xxxxx.xxxx.xxx V4.0 564 alpha > Hello Folks, > > I'm embarrassed to have to ask this but I have R'ed TFM-page and I can't > seem to get the necessary clue. I *have* to be missing something here. > > Once upon a time on a UNIX-like operating system I could "netstat -aA" > and find ports in a "LISTEN" state. Then pick the PCB from that output > and pass it to "ofiles" to find user/PID/progname listening at the port. > > The lsof man page _implies_ that lsof will take the PCB as the "name" > argument, but I can't get it to work... > > Anyone out there who can help me with a clue? > > DU = 4.0d > lsof = 4.07 > > -- > Peter deFriesse UNIX Systems Administration > Email: peter(at)oit.umass.edu [All standard disclaimers apply:]