#!/usr/bin/perl -w use strict; use LWP::Simple; my $address = $ARGV[0] || 'muskrat@mindless.com'; my ($data,$cgi); $data = $cgi = "down"; my $doc = get 'http://setiathome.ssl.berkeley.edu/fcgi-bin/fcgi?email='.$address.'&cmd=user_stats_new'; if ($doc =~ m/$address/is){ $cgi = "up"; } $doc = get 'http://setiathome.ssl.berkeley.edu/sstatus.html'; if ($doc =~ m/up and running/is){ $data = "up and running"; } if ($doc =~ m/dropping connections/) { $data .= " but dropping connections"; } my $gmt = gmtime(); print "As of $gmt, the stats server is $cgi and the data server is $data.";