[olug] get web server host name

Mr Scsi mrscsi at gmail.com
Fri Apr 11 02:17:23 UTC 2008


No, not resolve dns.

My bad for not being clearer.

What I have is a group of servers some at site 'A', some at site 'B' some at
site 'C' with a weighted load balancer system, (IBM Edge, these are
websphere boxes)

The team that owns the applications running on them want a light diag script
to get (most likely via lwp) wwwXX.domain.com XXX number of times, and count
how many times each server responds.
If the clusting is working correctly, multiple hits should bounce about the
groups of servers. They want to count how many times site 'A' server 1
responds and site 'A' server 2 responds, etc....

So, I need to get the hostname out of the response headers if possible.



On Thu, Apr 10, 2008 at 7:48 PM, Jay Hannah <jay at jays.net> wrote:

> On Apr 10, 2008, at 2:26 PM, Mr Scsi wrote:
> > Anyone have any quick and dirty perl ways to get the name of the
> > server that
> > serviced a http request?
>
> What? Are you just wanting to resolve DNS? use Net::DNS?
>
> http://search.cpan.org/~olaf/Net-DNS-0.63/lib/Net/DNS.pm<http://search.cpan.org/%7Eolaf/Net-DNS-0.63/lib/Net/DNS.pm>
>
> HTH,
>
> j
> Omaha Perl Mongers: http://omaha.pm.org
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>



More information about the OLUG mailing list