Subject: Re: Lag on Netstat
To: None <netbsd-help@NetBSD.ORG>
From: Alex R.N. Wetmore <alexw+@andrew.cmu.edu>
List: netbsd-help
Date: 02/22/1996 14:35:14
Excerpts from internet.computing.netbsd.netbsd-help: 22-Feb-96 Re: Lag
on Netstat by Hume Smith@three-elms.is 
> On NetBSD 1.1, I am getting a serious lag (on one machine only) when I do a
> netstat command or a w command.  It seems to lag at determining the source
> address on certain sessions, but I cannot seem to pin it down to a specific
> problem.  Has anyone seen this sort of behavior?  I've been through the
> hardware and cabling completely...even switching network cards and
> connections.  The load on the machine is low, and the network activity
> typically low too.  Any help would be appreciated.

It from doing reverse-DNS lookups.  To get around this with netstat
use netstat -n (it'll display numerical addresses).  You can do the 
same thing for w.

w has to do reverse-DNS because the login program in 4.4 BSD only saves
the DNS name if it can fit all of it into the utmp entry (which i think
means it has to be under 16 bytes).  If not it stuffs in the numeric
IP address.  This is handy because you can use it to always find out
where you are coming from (as opposed to most systems which truncate
the DNS name and stuff it into the utmp).

Here is an example showing that:
[phred:p8] ~/work % who
alex     ttyp8   Feb 22 14:33   (128.2.124.28)
[phred:p8] ~/work % w
 2:34PM  up 15 days, 20:21, 3 users, load averages: 0.55, 0.31, 0.18
USER    TTY FROM              LOGIN@  IDLE WHAT
alex     p8 GLACIER.WEH.ANDR  2:33PM     0 w
[phred:p8] ~/work % 

alex