netstat -p command takes a really long time to execute

netstat -p command takes a really long time to execute

Post by Gurvind » Wed, 08 May 2002 00:11:23



I'm dong an arp -a, or netstat -p, and its taking a really long time
to finish on one our boxes, a solaris 7 ultra-5.  It works fine on
the other solaris boxes here.  I do a truss on the command, a see
that its sleeping after listing one entry in the arp table.  Than after some
time, it lists another line in the table, and goes back to sleep.  This
keeps going on til the entire arp table is listed.  It takes about 100 seconds
to complete and there are only 8 entries in the arp table!!

The same situation when I do a netstat -a.  But if I do a netstat -an
it works fine.  So I'm quite puzzled here.  The reason I ask is that I think
this has something to do when I first telnet onto the box - it takes an
awfully long time for the login prompt to come, but after that everything is
okay.  This only occurs on this box, whereas I can telnet to the other boxes
fine.  All the boxes are on the SAME hub/switch.  Any ideas anyone????

 
 
 

netstat -p command takes a really long time to execute

Post by Nicholas Bachman » Wed, 08 May 2002 08:43:49



> The same situation when I do a netstat -a.  But if I do a netstat -an
> it works fine.  So I'm quite puzzled here.  The reason I ask is that I think
> this has something to do when I first telnet onto the box - it takes an
> awfully long time for the login prompt to come, but after that everything is
> okay.  This only occurs on this box, whereas I can telnet to the other boxes
> fine.  All the boxes are on the SAME hub/switch.  Any ideas anyone????

Sounds like a classic case of not enough memory avalible.  You might
check (assuming it has a decent amount of amount) for any memory hogs
with 'ps -Ao "fname pid pmem osz" | sort +3n'

--
         Regards,
         Nick
+-----------------------------------------------+
* Nicholas Bachmann, SSCP                       *
* http://hermie.freeshell.org                   *
+-----------------------------------------------+

 
 
 

netstat -p command takes a really long time to execute

Post by red0 » Wed, 08 May 2002 08:43:15



> The same situation when I do a netstat -a.  But if I do a netstat -an it
> works fine.  

Sounds like reverse DNS is slowing you down. Although, I dont know what
that would have to do with the arp table.  It may print out hostnames
instead of ip numbers.

Try fixing you resolv.conf and other things on that box, compare them to
the other boxes.  It seems like it has something to do with reverse DNS.

--red0x
[shpx zvpebfbsg]

 
 
 

netstat -p command takes a really long time to execute

Post by Doug Freyubrg » Wed, 08 May 2002 09:13:15



> I'm dong an arp -a, or netstat -p, and its taking a really long time
> to finish on one our boxes, a solaris 7 ultra-5.  It works fine on
> the other solaris boxes here.

Broken /etc/resolv.conf and/or /etc/nsswitch.conf on that machine.
 
 
 

netstat -p command takes a really long time to execute

Post by Nicholas Bachman » Wed, 08 May 2002 09:24:15




>> The same situation when I do a netstat -a.  But if I do a netstat -an
>> it works fine.  So I'm quite puzzled here.  The reason I ask is that I
>> think
>> this has something to do when I first telnet onto the box - it takes an
>> awfully long time for the login prompt to come, but after that
>> everything is
>> okay.  This only occurs on this box, whereas I can telnet to the other
>> boxes
>> fine.  All the boxes are on the SAME hub/switch.  Any ideas anyone????

> Sounds like a classic case of not enough memory avalible.  You might
> check (assuming it has a decent amount of amount) for any memory hogs
> with 'ps -Ao "fname pid pmem osz" | sort +3n'

I feel like a retard with everybody else saying (probably correctly)
that it's DNS.  I just have memories and stories of HP-UX machines at
the University of Michigan (with pretty skimpy memory and heavy loads)
taking forever and a day to give the login prompt.

Looking more closely, the whole -a vs. -an issue does look very DNS-ish.

--
         Regards,
         Nick
+-----------------------------------------------+
* Nicholas Bachmann, SSCP                       *
* http://hermie.freeshell.org                   *
+-----------------------------------------------+

 
 
 

netstat -p command takes a really long time to execute

Post by Jason Baughe » Thu, 23 May 2002 00:10:55


Quote:>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<


-p command takes a really long time to execute:

Quote:> I'm dong an arp -a, or netstat -p, and its taking a really long time
> to finish on one our boxes, a solaris 7 ultra-5.  It works fine on
> the other solaris boxes here.  I do a truss on the command, a see
> that its sleeping after listing one entry in the arp table.  Than after
some
> time, it lists another line in the table, and goes back to sleep.  This
> keeps going on til the entire arp table is listed.  It takes about 100
seconds
> to complete and there are only 8 entries in the arp table!!
> The same situation when I do a netstat -a.  But if I do a netstat -an
> it works fine.  So I'm quite puzzled here.  The reason I ask is that I
think
> this has something to do when I first telnet onto the box - it takes an
> awfully long time for the login prompt to come, but after that everything
is
> okay.  This only occurs on this box, whereas I can telnet to the other
boxes
> fine.  All the boxes are on the SAME hub/switch.  Any ideas anyone????

It is a reverse DNS issue.  I've run into this problem many many times.  
When you telnet to a Solaris/SunOS box, it does a reverse DNS lookup on
the IP address you are coming in from.  If you are coming from an IP that
does not lookup, it takes some time to fail and timeout and then go ahead
and allow the login program to proceed.

The reason you see the same delay with the netstat commands you are
running, such as netstat -a, but not with netstat -an, is that the 'n'
flag tells it to not try to reverse lookup the IP's that it lists in the
output, just to list them as IP's.

If only one of your Solaris boxes is doing this, then you most likely
have something set up wrong in the nsswitch.conf or in the resolv.conf
files, keeping the reverse lookups from happening.

Otherwise, you may not have all your client machines in DNS where the
Solaris box can resolve them.  Or with a small enough network, get them
into the Solaris /etc/hosts file.

We had this problem on a wider scale, and we lessened it by making sure
our internal and external DNS servers had a response for ALL the IP's in
our range, even if they weren't in use.

--
Jason Baugher
Virtual Adept Professional Consulting Services
1406 Adams St.
Quincy, IL 62301
(217) 221-5406
http://baugher.pike.il.us/virtualadept

 
 
 

1. Showing routing table, connecting to sshd takes a really long time

Just installed Solaris 8 on a Netra X1. The installation seemed fine,
but something isn't right with the networking.

Examples:

*When I do 'netstat -r', it takes about a minute for each entry to
appear

*When I connect to the machine using SSH, I have to wait at a blinking
cursor for a minute or so after supplying login/pass before I'm let
in.

Any Ideas?

/creamy

2. How do I print an HTML document?

3. route command takes a long time.

4. kernel recompilation error

5. ps command taking a lot of time

6. OLVWM - Unknown LC_CTYPE

7. [Fwd: Re: Help: recv takes a long time to time out!]

8. ELF libxview library

9. Help: recv takes a long time to time out!

10. fsck takes really long on Sun IPC?

11. "ps -ef" takes so long

12. mailq command taking forever to execute

13. recording the time it takes to execute a program