3 |
4 |
5 | Sorry this page does not exist
6 |
7 | The MRTG website has been restructured.
8 | Most things are still around, but probably under a new address.
9 |
10 |
--------------------------------------------------------------------------------
/src/contrib/mrtgmk/src/parsen.ftbl:
--------------------------------------------------------------------------------
1 | /*
2 | Iulian Radu [v2.0@07.1999]
3 | */
4 |
5 | struct fncttbl parsen_ftbl[]={
6 | {"HTMLCODE",fhtmlcoden},
7 | {"HTMLLINK",fhtmllinkn},
8 | {"LINK2DH",flink2dhn},
9 | {"DATA",fdata}
10 | };
11 |
12 | #define NEFTBLn 4
13 |
--------------------------------------------------------------------------------
/src/contrib/nt_n_cisco/make_all_cisco_configs.bat:
--------------------------------------------------------------------------------
1 |
2 | Set hostsfile=e:\cisco_devices_to_poll.txt
3 |
4 | Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
5 |
6 |
7 | For /F %PARSEARG% %%i in (%hostsfile%) Do START /BELOWNORMAL e:\mrtg\prod\bats\RUN_builder.bat %%i %%j %%k
8 |
9 |
10 | exit
11 |
--------------------------------------------------------------------------------
/src/contrib/linux_stat/readme:
--------------------------------------------------------------------------------
1 |
2 | I could not find a simple script to get the current traffic off a linux
3 | machine, so in open source sprit, I wrote my own. Here it is to share with
4 | all those looking for such a tool.
5 |
6 | Mike Machado
7 | mike@innercite.com
8 | InnerCite
9 | Network Specialist
10 |
--------------------------------------------------------------------------------
/src/contrib/nt_n_cisco/RunCcfgs.cmd:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | @set lDir=e:\mrtg\prod\bats
3 | @Set hostsfile=e:\cisco_devices_to_poll.txt
4 |
5 | @Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
6 |
7 |
8 | @For /F %PARSEARG% %%i in (%hostsfile%) Do START /BELOWNORMAL %lDir%\queryone.bat %%i
9 |
10 |
11 | @exit
12 |
--------------------------------------------------------------------------------
/src/contrib/get-equi/README:
--------------------------------------------------------------------------------
1 | From: Mike Gaertner
2 | Date: Tue, 25 Apr 2000 19:06:52 +0700 (ICT)
3 |
4 | The Equinox SST card does not provide SNMP support. Therefor I wrote a
5 | small perl script which reads out the byte counter from the Equinox SST
6 | board.
7 |
8 | Regards Mike Gaertner
9 |
10 |
--------------------------------------------------------------------------------
/web/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | SITEROOT=`pwd`
3 | PODPATH=`ls */build.sh | sed -e 's|/.*||g' | perl -0777 -e 'print join ":", map {"$_"} split /\n/, <>'`
4 | export SITEROOT PODPATH
5 | rm */pod*tmp
6 | for x in `ls */build.sh | sed 's|/.*||g'`; do
7 | echo '****' $x '****'
8 | (cd $x;./build.sh)
9 | done
10 |
11 |
12 |
--------------------------------------------------------------------------------
/web/nabble-mrtg.wml:
--------------------------------------------------------------------------------
1 |
3 | MRTG Mailinglists
4 | {#H1#:
5 | MRTG Mailinglists
6 |
7 | :#H1#}
8 |
9 |
--------------------------------------------------------------------------------
/src/contrib/gentcucci-1.0.0/nmcs.list:
--------------------------------------------------------------------------------
1 | # NMC's for Temperature monitoring.
2 | #
3 | # format
4 | #
5 | # ip_name:description
6 | #
7 | # example
8 | #
9 | # tc1b.i40:Coshocton 1 (tc1b.i40)
10 | # tc1.i40 Ping host
11 | # Coshocton 1 (tc1b.i40) Title for device
12 | #
13 | tc1b.i40:Coshocton TC (tc1.i40)
14 | tc1b.nwk:Newark TC (tc1.nwk)
15 |
--------------------------------------------------------------------------------
/src/contrib/apc_ups/README:
--------------------------------------------------------------------------------
1 | From: Klaus_Klein@mckinsey.com
2 | Date: Thu, 3 May 2001 16:31:45 +0200
3 |
4 | Hi tobias,
5 |
6 | As suggested, I send you some of my configuration files: these ones are
7 | using a PERL script to extract the load % and remaining battery time from
8 | APC UPS systems.
9 | prerequisite: have PERL and an SNMP suite installed.
10 |
--------------------------------------------------------------------------------
/src/contrib/exim-stats/email-totals1:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | finger @$1 > /tmp/$1
4 |
5 | IN=`grep "Number of messages received so far today:" /tmp/$1 | awk '{print $8}'`
6 | OUT=`grep "Number of messages delivered so far today:" /tmp/$1 | awk '{print $8}'`
7 |
8 | echo $IN
9 | echo $OUT
10 | date "+%H hours and %M minutes"
11 | echo $1-email-totals
12 |
13 |
--------------------------------------------------------------------------------
/src/contrib/mrtg-mail/mqueue:
--------------------------------------------------------------------------------
1 | #!/store/bin/perl
2 | # simple mqueue done with find2perl
3 |
4 | $hostname = "apollo";
5 |
6 | require "find.pl";
7 | # Traverse desired filesystems
8 | $counter = 0;
9 | &find('/var/spool/mqueue/');
10 | sub wanted {
11 | /^qf.*$/ &&
12 | $counter++;
13 | }
14 | chomp $counter;
15 | print "0\n$counter\n1\n$hostname\n";
16 |
--------------------------------------------------------------------------------
/src/contrib/mrtgmk/cfg/page2.cfg:
--------------------------------------------------------------------------------
1 | 0 HTMLFILE cfg/page2.html
2 | 0 HTMLCODE PC from local network - overview
3 | 0 HTMLCODE PC1 Trafic analyses
4 | 0 GIFD # pc1
5 | 0 HTMLCODE
6 | 0 HTMLCODE PC2 Trafic analyses
7 | 0 GIFD # pc2
8 | 0 HTMLCODE
9 | 0 HTMLCODE PC3 Trafic analyses
10 | 0 GIFD # pc3
11 | 0 HTMLCODE
12 |
--------------------------------------------------------------------------------
/src/contrib/mrtgmk/cfg/convert.cfg:
--------------------------------------------------------------------------------
1 | # We have here cfg/ appended in front of each file path because
2 | # all this files are relative to the directory from where we
3 | # start the mrtgmk.
4 |
5 | 0 MRTG.CFG mrtg.cfg mrtg_cfg
6 | 0 MSG
7 | 0 MSG I change the files name
8 | 0 CONVIP2NAME /usr/tardis/pub/www/stats/mrtg/
9 | 0 CHNGTRGNAME yes
10 | 0 INCLUDE hosts.cfg
11 | 0 MSG
12 |
--------------------------------------------------------------------------------
/src/t/translation.t:
--------------------------------------------------------------------------------
1 | use strict;
2 | use warnings;
3 |
4 | use Test::More tests => 1;
5 |
6 | use FindBin;
7 | use lib "${FindBin::Bin}/../lib/mrtg2";
8 | use locales_mrtg "0.08";
9 |
10 | my $LOC = $lang2tran::LOCALE{"brazilian"};
11 | unlike( &$LOC("The statistics were last updated Terça, 26 de Outubro"),
12 | qr/Saíubro/, "Issue #74");
13 |
14 |
--------------------------------------------------------------------------------
/web/.wmlrc:
--------------------------------------------------------------------------------
1 | -DROOT~.
2 |
3 | ###############################
4 | # Language setup
5 | -DLANGS="en"
6 |
7 | ###############################
8 |
9 | #-I/home/eedesign/public_html
10 | # last has priority
11 | -I.
12 |
13 | -E $(ROOT)/bin/htmlfix.sh
14 | -P $(ROOT)/bin/headfix.pl
15 |
16 | # tune mp4h behaviour (expansion 0 means complain about everything)
17 | -W "2,--expansion=0"
18 |
--------------------------------------------------------------------------------
/src/contrib/gentcucci-1.0.0/mrtg_autorun:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # Should be run every n minutes (generally either 5 or 10) in cron as in the
4 | # crontab example below...
5 | #
6 | # */5 * * * * /home/autorun/bin/mrtg_autorun
7 | #
8 | # Edit the paths for your system's needs.
9 | #
10 | cd /usr/local/mrtg/local-config
11 |
12 | gentcucci
13 | ../run/mrtg mrtg.tcusercount.cfg
14 | ../run/mrtg mrtg.tcdegree.cfg
15 |
--------------------------------------------------------------------------------
/src/contrib/meminfo/README:
--------------------------------------------------------------------------------
1 | From: Colin Tinker
2 | Date: Sat, 15 Jan 2000 20:23:32 -0000
3 |
4 | You may like to include the perl script below in the next
5 | release someone may find it useful. It checks /proc/meminfo for the used
6 | and free memory parsing it out for MRTG. it is my first attempt at a perl
7 | program so if any one can suggest any improvements feel free.
8 |
9 | Colin Tinker
10 |
--------------------------------------------------------------------------------
/web/bin/headfix.pl:
--------------------------------------------------------------------------------
1 | #!/usr/sepp/bin/perl-5.8.8
2 | undef $/; #slurp alll
3 | $_ = <>;
4 | while (s/]+))/|#include PAGE="$VAL{PAGE}" AUTHOR="$VAL{AUTHOR}" TYPE="$VAL{TYPE}"\n|si;
13 |
14 | print;
15 |
16 |
--------------------------------------------------------------------------------
/src/contrib/apc_ups/upsdata01.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 | #
3 | # Script to convert runtime MIB variable for UPS into minutes
4 |
5 | $a=`/usr/bin/snmpget .1.3.6.1.4.1.318.1.1.1.2.2.3.0`;
6 | chomp $a;
7 | @b=split(/ /,$a);
8 | @c=split(/:/,$b[4]);
9 | @d=split(/ /,`/usr/bin/snmpget .1.3.6.1.4.1.318.1.1.1.4.2.3.0`);
10 | chomp $d;
11 | print eval($c[0] * 60 + $c[1]),"\n";
12 | print $d[3];
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 1-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 1-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 1-2
4 |
5 |
6 |
7 | GIFgraph.pm - example 1-2
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 1-3
4 |
5 |
6 |
7 | GIFgraph.pm - example 1-3
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 1-4
4 |
5 |
6 |
7 | GIFgraph.pm - example 1-4
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 1-4
4 |
5 |
6 |
7 | GIFgraph.pm - example 1-5
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 2-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 2-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 5-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 5-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 5-2
4 |
5 |
6 |
7 | GIFgraph.pm - example 5-2
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 5-3
4 |
5 |
6 |
7 | GIFgraph.pm - example 5-3
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 5-4
4 |
5 |
6 |
7 | GIFgraph.pm - example 5-4
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 6-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 6-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 6-2
4 |
5 |
6 |
7 | GIFgraph.pm - example 6-2
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 9-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 9-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 9-2
4 |
5 |
6 |
7 | GIFgraph.pm - example 9-2
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 9-3
4 |
5 |
6 |
7 | GIFgraph.pm - example 9-3
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/diskmon/showdisk.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 | # Displays disk info to the hosts that connect to it.
3 | #
4 | # No command line options, just put it in /etc/inetd.conf as shown in
5 | # the README file.
6 | #
7 | # By Steven Micallef on the 24/4/1999.
8 |
9 | foreach $_ (`df -k | grep -v "Filesystem"`)
10 | {
11 | ($device, $size, $used, $free, $percent, $mount) = split(/\s+/);
12 | chop($percent);
13 | print "$percent\n";
14 | }
15 |
--------------------------------------------------------------------------------
/src/contrib/jm/README:
--------------------------------------------------------------------------------
1 | From: joeym@inficad.com
2 | Date: Tue, 9 Feb 1999 16:51:50 -0700
3 |
4 |
5 | Enclosed are a few perl scripts I wrote to collect stats on: # of users
6 | logged into a given shell machine, # of players on a quake server, and # of
7 | users currently reading news.
8 |
9 | They each have a little blurb in the header describing their use.
10 |
11 | --
12 | Joey Miller
13 | Lead Programmer
14 | Inficad Communications
15 | 602.265.4423 / 888.265.4423
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/contrib/stat/dns.named:
--------------------------------------------------------------------------------
1 | #!/usr/bin/expect
2 | # $Id: dns.named,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
3 | spawn ftp HOST.YOURE.DOMAIN
4 | expect "Name"
5 | send "USER\r"
6 | expect "^Password:"
7 | send "PASSWORD\r"
8 | expect "ftp>"
9 | send "cd /var/tmp\r"
10 | expect "ftp>"
11 | send "ascii\r"
12 | expect "ftp>"
13 | send "lcd DIRECTORY/WICH/STAT.pl/WILL/USE/TO/GET/NAMED.STATS\r"
14 | expect "ftp>"
15 | send "get named.stats\r"
16 | expect "ftp>"
17 | send "quit\r"
18 | sleep 4
19 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl:
--------------------------------------------------------------------------------
1 | use GIFgraph::pie;
2 |
3 | print STDERR "Processing sample 9-3\n";
4 |
5 | @data = (
6 | [ qw( 1st 2nd 3rd 4th 5th 6th 7th ) ],
7 | [ sort { $b <=> $a} (5.6, 2.1, 3.03, 4.05, 1.34, 0.2, 2.56) ]
8 | );
9 |
10 | $my_graph = new GIFgraph::pie( 200, 200 );
11 |
12 | $my_graph->set(
13 | start_angle => 90,
14 | '3d' => 0
15 | );
16 |
17 | $my_graph->plot_to_gif( "sample93.gif", \@data );
18 |
19 | exit;
20 |
21 |
--------------------------------------------------------------------------------
/src/contrib/cpuinfo/sample.cfg:
--------------------------------------------------------------------------------
1 | Target[machine]: `./cpuinfo.pl machine os`
2 | MaxBytes[machine]: 100
3 | Options[machine]: gauge, nopercent
4 | Unscaled[machine]: dwym
5 | YLegend[machine]: % of CPU used
6 | ShortLegend[machine]: %
7 | LegendO[machine]: CPU System:
8 | LegendI[machine]: CPU User:
9 | Title[machine]: Machine name
10 | PageTop[machine]: CPU usage for Machine name
11 |
12 |
13 | | System: | Machine name |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/contrib/mrtgmk/cfg/page1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Traffic analyses
5 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/contrib/mrtg-mail/mqueue.cfg:
--------------------------------------------------------------------------------
1 | Interval: 5
2 | #---------------------------------------------------------------
3 | Target[mq]: `/opt/mrtg/bin/mqueue`
4 | MaxBytes[mq]: 32000
5 | AbsMax[mq]: 64000
6 | Options[mq]: gauge
7 | Title[mq]: Sendmail Statistics
8 | PageTop[mq]: Sendmail MailQueue Statistics
9 | XSize[mq]: 500
10 | Supress[mq]: y
11 | YSize[mq]: 128
12 | WithPeak[mq]: my
13 | YLegend[mq]: No. of messages in mailq
14 | ShortLegend[mq]: Mailq
15 | LegendO[mq]: Mailq:
16 | LegendI[mq]:
17 |
--------------------------------------------------------------------------------
/src/get_ver.awk:
--------------------------------------------------------------------------------
1 | # fetch rateup version number from input file and write them to STDOUT
2 | BEGIN {
3 | while ((getline < ARGV[1]) > 0) {
4 | if (match ($0, /VERSION = "[^"]+"/)) {
5 | rateup_ver_str = substr($4, 2, length($4) - 3);
6 | split(rateup_ver_str, v, ".");
7 | gsub("[^0-9].*$", "", v[3]);
8 | rateup_ver = v[1] "," v[2] "," v[3];
9 | }
10 | }
11 | print "RATEUP_VERSION = " rateup_ver "";
12 | print "RATEUP_VERSION_STR = " rateup_ver_str "";
13 | }
14 |
--------------------------------------------------------------------------------
/src/contrib/IxDisk/ixdisk.cfg:
--------------------------------------------------------------------------------
1 | IconDir: /MRTG/mrtgicons/
2 | WorkDir: /opt/hppd/etc/NCSAhttpd/MRTG/ixdisk
3 |
4 | Target[ix]: `/opt/MRTG/run/IxDisk/ixdisk.pl`
5 | Title[ix]: Informix reads and writes from disk
6 | PageTop[ix]: Informix reads and writes from disk
7 | MaxBytes1[ix]: 2000000000
8 | MaxBytes2[ix]: 2000000000
9 | LegendI[ix]: reads
10 | LegendO[ix]: writes
11 | Legend1[ix]: reads
12 | Legend2[ix]: writes
13 | YLegend[ix]: Informix
14 | ShortLegend[ix]: #
15 |
16 |
--------------------------------------------------------------------------------
/src/contrib/GetSNMPLinesUP/INSTALL:
--------------------------------------------------------------------------------
1 |
2 | Read the docs from MRTG :). Learn to use MRTG :).
3 |
4 | Change "ADMINDIR" in the Makefile to where you want to put the
5 | executable and the tables.
6 |
7 | Change "$SNMPGet", "$TableBase" and "$Community" in GetSNMPLinesUP.pl
8 | for your correct values.
9 |
10 | See sample.cfg for a sample configuration entry of a machine with some
11 | modems connected.
12 |
13 | See ModemTable.dial-machine for the corresponding variables to check
14 | in this sample.
15 |
16 |
--------------------------------------------------------------------------------
/src/contrib/cfgmaker_ATM/README:
--------------------------------------------------------------------------------
1 | From: Henry Steinhauer
2 | Date: Tue, 15 Jun 1999 17:00:07 -0500
3 |
4 | This is gutted code from the other CFGmaker_ATM.pl code.
5 |
6 | This will pull the information from the Bay MIB for the SVC ATM setup and
7 | then create a target for each channel in the ATM that is defined.
8 |
9 | The Targets created can be sorted in the Indexmaker such that the Named ATM
10 | channel will have all the Subchannels grouped together.
11 |
12 | Enjoy.
13 | Henry Steinhauer
14 |
--------------------------------------------------------------------------------
/src/src/strftime.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** STRFTIME.H - For older compilers which lack strftime()
3 | **
4 | ** Note: To avoid name collision with newer compilers, the function name
5 | ** strftime_() is used.
6 | */
7 |
8 | #ifndef STRFTIME__H
9 | #define STRFTIME__H
10 |
11 | #include /* for size_t */
12 | #include /* for struct tm */
13 |
14 | size_t strftime_(char *s, size_t maxs, const char *f, const struct tm *t);
15 |
16 | extern char * tzname_[2];
17 |
18 | #endif /* STRFTIME__H */
19 |
--------------------------------------------------------------------------------
/src/contrib/nt_n_cisco/builder.bat:
--------------------------------------------------------------------------------
1 | set target=%1
2 | set snmpStr=%2
3 | set targetIP=%3
4 | set NewDir=%mrtgwebroot%\%target%
5 | set mrtgcurr=e:\mrtg\prod\bats
6 |
7 | e:
8 | cd\
9 | MD %NewDir%
10 | if not exist %mrtgwebroot%\%target%\default.asp copy %mrtgcurr%\default.asp %mrtgwebroot%\%target%\default_fixme.asp
11 |
12 | cd %mrtgbin%
13 | %perlbin%\perl %mrtgbin%\cfgmaker --workdir %mrtgwebroot%\%target% %snmpstr%@%targetIP% > %Mrtgcfgbin%\%target%.cfg
14 |
15 |
16 |
17 | e:
18 | cd\mrtg\prod\bats
19 | exit
--------------------------------------------------------------------------------
/src/contrib/mrtg-archiver-script/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | MRTG Statistics Archive
4 |
5 |
6 | MRTG Statistics Archive
7 |
13 |
14 | MRTG Statistics Archiver by Krot.
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 4-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 4-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 | NOTES
20 | Note that both data sets have a point missing.
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 3-1
4 |
5 |
6 |
7 | GIFgraph.pm - example 3-1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 | NOTE
20 | Notice that the green set doesn't have an entry for the 7th point.
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/contrib/TCH/README:
--------------------------------------------------------------------------------
1 | Date: Tue, 16 Feb 1999 16:44:12 -0700
2 | From: Eric Billeter
3 |
4 | Here are some scripts i modified to monitor the modem utilization
5 | of my USR Total control racks. They work great even though I am
6 | not a programmer. If there is anything you see that would work
7 | more efficiently it would be appreciated.
8 | The files are as follows
9 |
10 | dualt1.pl - TCH with dual t1 card.
11 | dualpri.pl - TCH with dual pri card.
12 | hiperdsp.pl - TCH with hiperdsp cards.
13 | mrtg-cfg.txt - snippet of cfg file
14 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 1-6
4 |
5 |
6 |
7 | GIFgraph.pm - example 1-3
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 | NOTES
20 | There was no data for the credits on the third and the debets on the 7th day.
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl:
--------------------------------------------------------------------------------
1 | use GIFgraph::pie;
2 |
3 | print STDERR "Processing sample 9-2\n";
4 |
5 | @data = (
6 | ["1st","2nd","3rd","4th","5th","6th"],
7 | [ 4, 2, 3, 4, 3, 3.5]
8 | );
9 |
10 | $my_graph = new GIFgraph::pie( 250, 200 );
11 |
12 | $my_graph->set(
13 | title => 'A Pie Chart',
14 | label => 'Label',
15 | axislabelclr => 'white',
16 | dclrs => [ 'lblue' ],
17 | accentclr => 'lgray',
18 | );
19 |
20 | $my_graph->plot_to_gif( "sample92.gif", \@data );
21 |
22 | exit;
23 |
24 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl:
--------------------------------------------------------------------------------
1 | use GIFgraph::pie;
2 |
3 | print STDERR "Processing sample 9-1\n";
4 |
5 | @data = (
6 | ["1st","2nd","3rd","4th","5th","6th"],
7 | [ 4, 2, 3, 4, 3, 3.5]
8 | );
9 |
10 | $my_graph = new GIFgraph::pie( 250, 200 );
11 | #$my_graph = new GIFgraph::pie( );
12 |
13 | $my_graph->set(
14 | title => 'A Pie Chart',
15 | label => 'Label',
16 | axislabelclr => 'black',
17 | pie_height => 36,
18 | );
19 |
20 | $my_graph->plot_to_gif( "sample91.gif", \@data );
21 |
22 | exit;
23 |
24 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | GIFgraph.pm - example 4-2
4 |
5 |
6 |
7 | GIFgraph.pm - example 4-2
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
The code.
16 |
17 |
18 |
19 | NOTES
20 | This is the same graph as sample41, but this time the data has been read from a CSV file.
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/web/support/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | sect=doc
3 | src=/home/oetiker/checkouts/mrtg/src/
4 | . ../bin/pod2wml.sh
5 |
6 | pod2descr() {
7 | pod=$1.pod
8 | descr=`egrep "$1 *- " $pod|head -1|sed 's/.*- //'`
9 | menu=`egrep "$1 *- " $pod|head -1|sed 's/ -.*//'`
10 | }
11 |
12 |
13 | # build probe list
14 | rm -f navbar.inc
15 | rm -f index.inc
16 |
17 | for pod in mrtg-forum.pod; do
18 | base=`echo $pod |sed 's,.pod,,'`
19 | echo $base
20 | cat $src/doc/$pod > $base.pod
21 | pod2descr $base
22 | pod2wml $base
23 | done
24 |
25 | mv mrtg-forum.wml index.wml
26 |
--------------------------------------------------------------------------------
/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl:
--------------------------------------------------------------------------------
1 | use GIFgraph::pie;
2 |
3 | print STDERR "Processing sample 9-4\n";
4 |
5 | @data = (
6 | [ qw( 1st 2nd 3rd 4th 5th 6th 7th ) ],
7 | [ sort { $b <=> $a} (5.6, 2.1, 3.03, 4.05, 1.34, 0.2, 2.56) ]
8 | );
9 |
10 | $my_graph = new GIFgraph::pie( 260, 300 );
11 |
12 | $my_graph->set(
13 | start_angle => 90,
14 | '3d' => 0
15 | );
16 |
17 | $my_graph->set_legend( 'Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Forget', 'Rest');
18 |
19 | $my_graph->plot_to_gif( "sample94.gif", \@data );
20 |
21 | exit;
22 |
23 |
--------------------------------------------------------------------------------
/src/contrib/mrtg-archiver-script/to-crontab:
--------------------------------------------------------------------------------
1 | 19 0 * * * /usr/local/lib/mrtg/mrtg-archiver -d --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
2 | 19 0 * * mon /usr/local/lib/mrtg/mrtg-archiver -w --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
3 | 19 0 1 * * /usr/local/lib/mrtg/mrtg-archiver -m --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
4 | 19 0 1 Jan * /usr/local/lib/mrtg/mrtg-archiver -y --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
--------------------------------------------------------------------------------
/web/bin/fix-hrefs.pl:
--------------------------------------------------------------------------------
1 | #!/usr/sepp/bin/perl-5.8.8 -w
2 |
3 | use strict;
4 | use HTML::Parser;
5 |
6 | my $p = HTML::Parser->new(api_version => 3);
7 | $p->handler(start => \&startsub, 'tagname, text');
8 | #$p->handler(end => \&endsub, 'tagname, text');
9 | $p->handler(default => sub { print shift() }, 'text');
10 | $p->parse_file(shift||"-") or die("parse: $!");
11 |
12 | sub startsub {
13 | my $tag = shift;
14 | my $text = shift;
15 |
16 | if ($tag eq "a") {
17 | $text =~ s,".*?/web/doc/,",;
18 | $text =~ /^http/ || $text =~ s,\.html,.en.html,;
19 | }
20 | print $text;
21 | }
22 |
--------------------------------------------------------------------------------
/src/contrib/accesslistmon/examplescript:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | rsh x.x.x.x sh access-list 102 | grep icmp | grep matches | grep x.x.x.x | awk ' { print $8 }' | sed s/\(//
3 | echo "0"
4 |
5 | #The first line will rsh into the router and display access-list number 102 (this will change
6 | #depending on your config), it will grep the access-list entry type in this case 'icmp', it
7 | #will also grep the ip of the machine in question, and output the relevant information.
8 |
9 | Eg:
10 |
11 | 10
12 | 0
13 |
14 | 10 = the number of times the ACL has matched.
15 |
16 | Remember you can change this to whatever you want.
17 |
--------------------------------------------------------------------------------
/src/contrib/get-active/README:
--------------------------------------------------------------------------------
1 | From leewm@hpsgmx18.sgp.hp.com Mon Nov 3 09:19:59 1997
2 | Date: Sat, 01 Nov 1997 23:03:45 SGP
3 | From: Wee-Meng LEE
4 | To: oetiker@ee.ethz.ch
5 | Subject: get-active.pl
6 |
7 | Hi Tobi,
8 |
9 | A collegue and I did some improvements in the get-active.pl
10 | script written by Russ Wright in the contrib directory.
11 |
12 | get-active2.pl does a summary page of all the router interfaces
13 | being monitored and it proved to be very useful.
14 |
15 | I'm not able to contact Russ but feel free to pass the code
16 | around.
17 |
18 | Rgds,
19 | weemeng
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/contrib/mrtgmk/cfg/a.cfg:
--------------------------------------------------------------------------------
1 | # We have here cfg/ appended in front of each file path because
2 | # all this files are relative to the directory from where we
3 | # start the mrtgmk.
4 |
5 | 0 MRTG.CFG cfg/mrtg.cfg cfg/mrtg_cfg
6 | 0 INCLUDE cfg/alias.cfg
7 | 0 INCLUDE cfg/misc.cfg
8 | 0 MKD 192.168.10.1.cfg cfg/today.html
9 | 0 INCLUDE cfg/hosts.cfg
10 |
11 | 0 MSG
12 | 0 MSG I create the thml pages
13 | 0 INCLUDE cfg/page1.cfg
14 | 0 INCLUDE cfg/page2.cfg
15 |
16 | 0 MSG
17 | 0 MSG I create a special directory in cfg,
18 | 0 MSG with links through pcn's graphs for admin of pcn
19 | 0 INCLUDE cfg/links.cfg
20 |
21 | 0 MSG
22 |
--------------------------------------------------------------------------------
/src/contrib/mrtg-ipget/README:
--------------------------------------------------------------------------------
1 | Date: Fri, 17 Jan 1997 21:39:06 -0500
2 | From: Jim Willette
3 |
4 | Again I must state that this does no error checking what so ever. Just a
5 | quick hack to get me the results I needed.
6 |
7 | I have modified mrtgV2 to record stats based on interface ip address instead
8 | of Interface number. It does not do all the great errorchecking and no OS
9 | testing but it is functional for my needs.
10 |
11 | applie the patch by typing
12 |
13 | patch
2 |
3 |
4 |
5 |
6 |
7 | MRTG remove switch:
8 |
9 |
10 |
11 |
12 | Configuration:
13 |
18 |
Back to index
19 |
20 |
21 |