#!/usr/bin/perl # part of the pkt-loss-warning package; A.Daviel, TRIUMF $libloc = "/usr/local/lib/libwww-perl-0.40" ; unshift(@INC, $libloc); require "wwwdates.pl" ; $file = "/usr/local/etc/httpd/htdocs/net/nodes.dat" ; open (IN,$file) || print "Unable to open data file

\n"; while () { chop ; tr / //s ; s/^ //; if (/^#/) { next ; } # comment ($address,$threshold,$threshold_m) = split(/ /) ; if ($address) { push(@address,$address) ; } } @stat = stat($0) ; $mymodtime = $stat[9] ; $ims = $ENV{'HTTP_IF_MODIFIED_SINCE'} ; @stat = stat($file) ; $modtime = $stat[9] ; if ($mymodtime > $modtime) {$modtime = $mymodtime ; } $ims =~ s/;.*// ; # for Netscape $ims = &wwwdates'get_gmtime($ims) ; if ($ims && $modtime<=$ims) { print "Status: 304 Not Modified\n\n" ; exit ; } $glastmod = &wwwdates'wtime($modtime ,'GMT'); print "Content-type: text/html\nLast-Modified: $glastmod\n\n"; print "Recent Packet Loss from TRIUMF\n"; print "

Recent Packet Loss from TRIUMF

\n

\"Cache


* Back to Index * Back to Sitka Homepage * Get Package (pkt-loss-warning.tar.gz) ";