Well...no I don't have this (and would love one), BUT I recently wrote a cool little
script that turns the output of "pmwho" (from the "pmwho.c" floating around) into
a "modem usage" page.
I have included the CGI Perl script below.
For a demo, check out "http://www.macatawa.org/cgi-bin/mstat.pl". Pretty cool for
our users.
-- Mike
-------------------------------------------------------------
Mike Jipping | jipping@cs.hope.edu
Hope College | (616) 395-7509
Department of Computer Science |
"... Dogs are the leaders of the planet. If you see two life
forms, one of them's making a poop, the other's carrying it for
him, who would you assume is in charge?"
-- Jerry Seinfeld, "SeinLanguage"
============================================
#!/usr/contrib/bin/perl
sub gen_header
{
print 'Content-type: text/html
<META HTTP-EQUIV="Refresh" CONTENT=900>
Here is a visual representation of the current usage status of the MAFN modem bank.
Busy Modem
Unused Modem
'
}
sub gen_modem_count
{
open(PMWHO, "/usr/local/bin/pmwho |");
$line = 0;
while (
Time of sample: $date
&gen_header();
';
} else {
print '
';
}
}
}
sub gen_modem_stats
{
$util = $count / 16 * 100;
$date = `date`;
print "
";
printf("Utilization = %5.1f%%\n
}
&gen_modem_count();
print '<BR><BR><IMG SRC="/hoz_rule.gif" ALT=>';
&gen_modem_stats();
&close_doc();