TCP daemon port number collisions

TCP daemon port number collisions

Post by Steve Pusha » Thu, 22 Oct 1998 04:00:00



How can I determine what pre-existing TCP daemon port numbers are in use by
other services? I need to do this for HP-UX, Sun (Solaris), and AIX.
 
 
 

TCP daemon port number collisions

Post by John Kotche » Thu, 22 Oct 1998 04:00:00



> How can I determine what pre-existing TCP daemon port numbers are in use by
> other services? I need to do this for HP-UX, Sun (Solaris), and AIX.

netstat -an | pg should work for AIX and Solaris and probably for HP-UX
it's been way too long.

This will only get you services that are already running.  You could
run into a conflict if the service is defined but not running, like
TELNET or FTP, etc. that are spawned out of /etc/inetd.conf.

--
************************************************************
* A goofy Unix SA working for a large computer equipment   *
* manufacturer and  services provider.  Opinions expressed *

************************************************************

 
 
 

TCP daemon port number collisions

Post by JL Merchado » Thu, 22 Oct 1998 04:00:00


Steve Pushak a crit:

Quote:> How can I determine what pre-existing TCP daemon port numbers are in use by
> other services? I need to do this for HP-UX, Sun (Solaris), and AIX.

  You can also run "iss". This program scans all ports for one, or several, IP
adresses. it will give you all the "active" ports. You can download it from
http://www-frec.bull.com for the AIX version.

Regards

 
 
 

TCP daemon port number collisions

Post by Rick Jon » Thu, 22 Oct 1998 04:00:00


: How can I determine what pre-existing TCP daemon port numbers are in
: use by other services? I need to do this for HP-UX, Sun (Solaris),
: and AIX.

Open a socket, and try to bind to that port number. If the port is in
use, the bind will fail unless you set SO_REUSEADDR. Another
possibility would be to parse the output of something like "netstat
-an."

rick jones
--
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, or post, but please do not do both...
my email address is raj in the cup.hp.com domain...

 
 
 

TCP daemon port number collisions

Post by hans maye » Fri, 23 Oct 1998 04:00:00


Quote:>> How can I determine what pre-existing TCP daemon port numbers are in use by
>> other services? I need to do this for HP-UX, Sun (Solaris), and AIX.

>  You can also run "iss". This program scans all ports for one, or several, IP
>adresses. it will give you all the "active" ports. You can download it from
>http://www-frec.bull.com for the AIX version.

or try to download and compile lsof.
lsof is a very usefull tool, i am using sometimes in solaris environment.

--
best regards from vienna           |   mayer (at) unisys.co.at_SPAM
hans                               |   mayer (at) relay.bfl.at_SPAM