Re: My domain names are backwards

From: Mark Visser <>
Date: Mon, 23 Jun 1997 22:39:06 +0200 (MET DST)

On Sun, 22 Jun 1997, Duncan Anker wrote:

> Hi all,
> I recently ran the summary scripts over my log files to get some
> idea of who's doing what, and noticed that client names are
> reversed, so for example I get:
> showing up in the logs. This is not overly helpful since all the
> machines in our lab start with nsp.
> It's an easy enough problem to fix, I suspect I just need to remove
> the call to rev_fqdn in the script, but I am more interested in
> knowing why this is the case, and fixing the source of the problem
> rather than kludging.

Hmm... that's an easy one...look at the scripts (i presume you're using
the ones from Squid's homesite)

I first wanted to see the full names..not abbreviated to 25 characters..
so i set in $namelength to 50.

Then i wanted to see it in the correct order (hostname not reversed)..
To do that i changed:

(around line 110)
\&xsort,\&fqdn,$TopN); in \&clsort,\&rev_fqdn,$TopN);

(around line 112)
\&xsort,\&server,$TopN); in \&xsort,\&rev_server,$TopN);

(around line 119)
undef,\&fqdn,undef); in undef,\&rev_fqdn,undef);

(around line 360)

change sub rev_server to sub server
$name = join ('.', @F); in $name = join ('.', reverse @F);

As far as i remember this is all i changed, it works ok here..


Mark Visser | Student Civiele Technologie & Management
Calslaan 26 - 31 | E-mail:
7522 MC Enschede | SNT-mail:
Telephone: 053-4895038 |
Warning: You can get rid of all the bugs by disabling them from the main menu.
Received on Mon Jun 23 1997 - 13:48:59 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:34 MST