Re: Netstat Problem on solaris 5.8



Thanks Ewald
Your suggestion works well.
The problem was , the entry for that port number in /etc/services
and we made the the changes in our script and now it works well.

Thanks again

-Manish

Ewald Ertl wrote:
Hi!

the man page for netstat(1M) on Solaris 9 ( but must also be on Solaris 8 ) prints for the
option -n

-n Show network addresses as numbers. netstat normally
displays addresses as symbols. This option may be used
with any of the display formats.

When not using the option "-n" the ports are translated according to the name
found in /etc/services.
So you have to look in /etc/services or wich resolving you've selected in
nsswitch.conf for the name of the port you are looking for.
You should then be able to find the port with the name without using the option
-n

HTH Ewald

manishs.in@xxxxxxxxx wrote:
Hi ,

We are facing one problem with sockets on solaris 5.8.
we have a client/server scenario. When the communication is
over between client and server the socket goes into TIME_WAIT state.
I guess this is a normal behaviour.

When we want to use the application again, the problem comes.
we used the following command in shell script:
netstat|grep XXXX

to get the status of port and if it is there in display we put a sleep
command.
so that we get some time to wait till the port is available

The output of netstat on solaris is creating a problem for us
on simply using "netstat" command that port doesn't comes in listing.
"netstat -a" is also not showing that port.
if i use "netstat -n" then only i am able to get that ports status.

any hints where could the exact problem is?

-manish


.



Relevant Pages

  • Re: Have I been compromised? chkrootkit: "Warning: Possible LKM Trojan installed" - nmap:
    ... assuming netstat wasn't one of the programs ... listed there for port 1313 correspond to the PIDs chkproc spit out. ... all your services while you upgrade all the software that needs upgrading. ... > Every week or so I'll run chkrootkit, mostly just because I feel I ...
    (comp.os.linux.security)
  • Having trouble reading from stderr
    ... I'm trying to write a script that will establish an ssh tunnel through ... there's already a tunnel established on the same port, in which case, ... I'd like to be able to read the error message from the script. ... the popen3 command from the open3 library is ...
    (comp.lang.ruby)
  • Re: Having trouble reading from stderr
    ... I'm trying to write a script that will establish an ssh tunnel through ... there's already a tunnel established on the same port, in which case, ... I'd like to be able to read the error message from the script. ... the popen3 command from the open3 library is ...
    (comp.lang.ruby)
  • Subject: Re: Reading Ports ! 7/4/2005 9:08 AM PST
    ... Good evening Team: ... >How can I know, when some Pc has connected to my pc through some port ?, ... Bring up a command prompt and type "netstat -a". ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Netstat Problem on solaris 5.8
    ... with any of the display formats. ... You should then be able to find the port with the name without using the option ... we used the following command in shell script: ... The output of netstat on solaris is creating a problem for us ...
    (comp.unix.solaris)