*BSD News Article 91614


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!not-for-mail
From: Chooka <dhenshaw@silas.cc.monash.edu.au>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Finding services offered on machine.
Date: Sat, 22 Mar 1997 16:07:26 +1100
Organization: Monash University
Lines: 33
Message-ID: <3333690E.167EB0E7@silas.cc.monash.edu.au>
References: <332FB47C.2781E494@silas.cc.monash.edu.au> <5goslo$9im$1@kayrad.ziplink.net>
NNTP-Posting-Host: ascendp-int-55.cc.monash.edu.au
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NNTP-Posting-User: root
X-Mailer: Mozilla 3.01Gold (X11; I; FreeBSD 2.1.5-RELEASE i386)
To: Steve Bernacki <steve@ziplink.net>
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37523

Steve Bernacki wrote:
> 
> The easiest way to see what services are running on your system right
> now is to issue the following command:
> 
> netstat -a | egrep LISTEN
> 
>

That's part way there...
But what if I want to know exactely what port numbers are in use...
and what process is using them....

i.e.

Port	Service
80	httpd
6000	XF86
21	ftpd -l 
...
...
etc...

I need more concise stats so that I can establish which ports are free
for use by a program.  That way I can generate a script that will search
for free ports that could be used by a program and dynamically use these
during compilation...

Any more advice appreciated.

Thanx,
David H
dhenshaw@silas.cc.monash.edu.au