#!/usr/bin/perl
print "Content-type: text/html\n\n";
$host=`hostname`;
chop $host;
$uptime=`uptime`;
$w=`w -s -h`;
print <<EOF;
<HTML><HEAD>
<TITLE>$host Status</TITLE>
</HEAD><BODY>
<H1>$host uptime</H1>
<PRE>$uptime</PRE>
<H1>logged on at $host</H1>
<PRE>$w</PRE>
<HR>
</BODY></HTML>
EOF
exit;
