From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076340321492.tru64-unix-managers.marc@archive.invalid> From: P.Lister () cranfield ! ac ! uk (by way of Postmaster

) Date: Fri, 11 Oct 1996 11:21:41 +0000 To: tru64-unix-managers Subject: [SUMMARY] How do I find which process owns a tcp port? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076340321492 Thanks to everyone who replied. The overwhelming majority said "get lsof", and lsof -i tells me just what I need to know, with just one niggle - it seems not to distinguish between source and destination address/port combinations, so that it seems impossible to express "show me all the connections from host x to port y". However, this is a very minor gripe, and it probably means I haven't delved the details out of the man page. It would also be nice to have extended host selection (i.e. everyone not on the local network), but I'm sure that these can be built into lsof, or postprocessed. FWIW, I did check the archive, but I couldn't find any query which looked like what I needed. Hopefully, this email will be found by future enquirers before it gets asked again. The non lsof answers mentioned various weird and wonderful options to netstat. Maybe there are some on other systems, but I certainly couldn't make them work on alpha-osf. To all the people who suggested ways of munging netstat I say thanks for the contribution, but have you heard about lsof? :-) -- Peter Lister Email: p.lister@cranfield.ac.uk Computer Centre, Cranfield University Voice: +44 1234 754200 ext 2828 Cranfield, Bedfordshire MK43 0AL UK Fax: +44 1234 751814 ------------------------------------------------------------------------ GLENDOWER I can call spirits from the vasty deep. HOTSPUR Why, so can I, or so can any man; But will they come when you do call for them? (Henry IV, pt 1) ------------------------------------------------------------------------