#!/usr/bin/perl -w
print "Content-type: text/plain", "\n\n";
($day, $month, $year) = (gmtime)[3, 4, 5];
$year += 1900;
@months = qw/ January February March April
May June July August
September October November December/;
$month = $months[$month];
$sup = "th";
if (($day == 1) or ($day == 21) or ($day == 31)) {
$sup = "st";
} elsif (($day == 2) or ($day == 22)) {
$sup = "nd";
} elsif (($day == 3) or ($day == 23)) {
$sup = "rd";
}
$day .= "" . $sup . "";
open (FH, "/proc/interrupts");
@data = ;
close FH;
$ints = $data[1];
$ints =~ m/(\d{3,15})/;
$ints = $1;
$ints = int($ints / 360000 / 24);
if ($ints >= 50) {
print "This server has been up for $ints days";
}
printf "
at %02d:%02d:%02d GMT on ",(gmtime)[2],(gmtime)[1],(gmtime)[0];
print "$day $month $year.\n";