[mrtg] Re: calculate_traffic.pl

Morten S. Nielsen msn at ipt.dtu.dk
Tue Oct 12 10:57:09 MEST 1999




Servicepack SR12 for NT. Available at www.linux.org

--    Morten S. Nielsen    mailto:msn at ipt.dtu.dk
--
--  |   Linux - the choice of a GNU generation   |
--  |      Skaane Sjaelland Linux User Group     |
--  |         at http://www.sslug.dk             |

On Mon, 11 Oct 1999, Charles Burton wrote:

> 	I hope I don't sound completely stupid by asking this. I am using NT
> so I am used to using the scrap's MRTG leaves behind b/c I know it is really
> built for *nix systems. Is there a way to get the Perl file
> calculate_traffic.pl to output to a Web page? I run it from command prompt
> and it work's great.
> 
> BTW To whoever wrote calculate_traffic.pl Great script!

I don't know what calculate_traffic.pl outputs, but it shouldn't be to
hard to change the output from the command prompt to a html page. If
it's only a matter of showing some ascii text  a verbatim script should
do:

## ascii to html verbatim #################################################
#!/usr/local/bin/perl
# Tell the browser that we are sending it HTML (for cgi):
# print "Content-type: text/html\n\n";

# Print a nice HTML header
print STDOUT<<"EOT";
<HTML>
<Head><Title>Verbatim</Title></Head>

<Body>
<PRE><I>
EOT

# Now print the verbatim text
while(<>){ print $_; };

# Close the HTML, and exit
print STDOUT<<"EOT";

</I></PRE>
</Body></HTML>
EOT

exit;
### end ################################################################

> 
> 
> > Charles Burton
> > Systems Technician A+ MCSE
> > Structure (X)
> > charles.burton at structurex.net
> > 
> 
> --
> * To unsubscribe from the mrtg mailing list, send a message with the
>   subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
> 

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list