[Orca-checkins] rev 82 - in trunk/orca: . fmrtg fmrtg/sample_configs percollator

blair at orcaware.com blair at orcaware.com
Sat Jul 13 18:21:01 PDT 2002


Author: blair
Date: Fri, 28 Jun 2002 21:52:49 -0700
New Revision: 82

Modified:
   trunk/orca/CHANGES
   trunk/orca/fmrtg/README
   trunk/orca/fmrtg/fmrtg
   trunk/orca/fmrtg/fmrtg.man
   trunk/orca/fmrtg/sample_configs/homesteaders.cfg
   trunk/orca/fmrtg/sample_configs/keynote.cfg
   trunk/orca/fmrtg/sample_configs/percollator.cfg
   trunk/orca/percollator/restart_percol
   trunk/orca/percollator/start_percol
Log:
Load fmrtg-0.11 into trunk/orca.


Modified: trunk/orca/fmrtg/fmrtg
==============================================================================
--- trunk/orca/fmrtg/fmrtg	(original)
+++ trunk/orca/fmrtg/fmrtg	Sat Jul 13 18:20:14 2002
@@ -10,7 +10,7 @@
 $| = 1;
 
 use Carp;
-use MD5 1.7;
+use Digest::MD5 2.00 qw(md5);
 use Math::IntervalSearch 1.00 qw(interval_search);
 use Data::Dumper;
 $Data::Dumper::Indent   = 1;
@@ -18,10 +18,7 @@
 $Data::Dumper::Deepcopy = 1;
 
 # This is the version of this code.
-my $VERSION = 0.10;
-
-# Create an MD5 context for use.
-my $md5 = MD5->new;
+my $VERSION = 0.11;
 
 # The number of seconds in one day.
 my $day_seconds = 24*60*60;
@@ -858,7 +855,7 @@
 package MRTG::SourceDataFile;
 
 use Carp;
-use MD5;
+use Digest::MD5 qw(md5);
 use vars qw(@ISA);
 
 @ISA = qw(MRTG::DataFile);
@@ -993,7 +990,7 @@
   if ($line) {
     $self->{_first_line} = 1;
     my @line = split(' ', $line);
-    my $cache_key = $md5->hexhash(join("\200", @line));
+    my $cache_key = md5(join("\200", @line));
     unless (defined $first_line_cache{$cache_key}) {
       $first_line_cache{$cache_key} = \@line;
     }
@@ -1056,8 +1053,8 @@
   # group, and column description.  Use an MD5 hash instead of a very long
   # key.
   my @column_description = @{$self->{_column_description}};
-  my $plot_key = join("\200", $files_key, $group, @column_description);
-  my $cache_key = $md5->hexhash($plot_key);
+  my $plot_key  = join("\200", $files_key, $group, @column_description);
+  my $cache_key = md5($plot_key);
   if (defined $all_rrds_cache{$cache_key}) {
     $self->{_all_rrd_ref} = $all_rrds_cache{$cache_key};
     $self->{_my_rrd_hash} = $my_rrds_cache{$cache_key};
@@ -1281,7 +1278,7 @@
     for (my $j=0; $j<@column_commands; ++$j) {
 
       my $expr      = "sub {\n  return @{$column_commands[$j]};\n}\n";
-      my $expr_hash = $md5->hexhash($expr);
+      my $expr_hash = md5($expr);
 
       my $choose_data_sub;
       my $data_name = join('_', @{$plot->{data}[$j]});
@@ -2441,9 +2438,9 @@
       }
     }
 
-    # Check that the date_source is either column followed by a column name
-    # or file_mtime for the file modification time.  If a column_name is used,
-    # then the date_format is required.
+    # Check that the date_source is either column_name followed by a column
+    # name or file_mtime for the file modification time.  If a column_name
+    # is used, then the date_format is required.
     my $date_source = $config_files->{$files_key}{date_source}[0];
     if ($date_source eq 'column_name') {
       unless (@{$config_files->{$files_key}{date_source}} == 2) {
@@ -2927,19 +2924,27 @@
 I have used only version version 5.005_02 of Perl with FMRTG.  Because
 FMRTG makes very heavy use of references, it may or may not work
 with older versions of Perl.  I welcome feedback if FMRTG works with
-older Perls.  FMRTG also requires Math::IntervalSearch module which is
-included with the Math::Interpolate module.  Both modules are available
-for download from a CPAN (Comprehensive Perl Archive Network) site near
-your at
+older Perls.
+
+FMRTG also requires several other Perl modules.  These are:
 
- http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.00.tar.gz
+  Math::IntervalSearch
+   Version 1.00 or greater.
+   ftp://ftp.gps.caltech.edu/pub/blair/Perl/Math-Interpolate-1.00.tar.gz
+   http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.00.tar.gz
 
-or from my FTP site:
+  Digest::MD5
+   Version 2.00 or greater.
+   http://www.perl.com/CPAN/authors/id/authors/id/GAAS/Digest-MD5-2.00.tar.gz
 
-  ftp://ftp.gps.caltech.edu/pub/blair/Perl/Math-Interpolate-1.00.tar.gz
+  RRD
+   Version 19981122.22 or greater.
+   http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/3.0/
 
-Once you have downloaded the Math-Interpolate-1.00.tar.gz file, uncompress
-and install it using the following commands:
+The modules can be installed into your Perl tree with the following
+commands:
+
+Math::Interval:
 
   % gunzip -c Math-Interpolate-1.00.tar.gz | tar xvf -
   % cd Math-Interpolate-1.00
@@ -2948,12 +2953,16 @@
   % make test
   % make install
 
-The final component required by FMRTG is the RRD Perl library that comes
-with RRD.  Here, get RRD from:
+Digest::MD5
 
-  http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/3.0
+  % gunzip -c Digest-MD5-2.00.tar.gz | tar xvf -
+  % cd Digest-MD5-2.00
+  % perl Makefile.PL
+  % make
+  % make test
+  % make install
 
-Get the most recent distribution and following the following steps:
+RRD:
 
   % gunzip -c mrtg-199?????.??.tar.gz | tar xvf -
   % cd mrtg-199?????.??

Modified: trunk/orca/fmrtg/fmrtg.man
==============================================================================
--- trunk/orca/fmrtg/fmrtg.man	(original)
+++ trunk/orca/fmrtg/fmrtg.man	Sat Jul 13 18:20:15 2002
@@ -93,7 +93,7 @@
 .nr % 0
 .rr F
 .\}
-.TH FMRTG 1 "perl 5.005, patch 02" "7/Dec/98" "User Contributed Perl Documentation"
+.TH FMRTG 1 "perl 5.005, patch 02" "8/Dec/98" "User Contributed Perl Documentation"
 .UC
 .if n .hy 0
 .if n .na
@@ -237,21 +237,30 @@
 I have used only version version 5.005_02 of Perl with FMRTG.  Because
 FMRTG makes very heavy use of references, it may or may not work
 with older versions of Perl.  I welcome feedback if FMRTG works with
-older Perls.  FMRTG also requires Math::IntervalSearch module which is
-included with the Math::Interpolate module.  Both modules are available
-for download from a CPAN (Comprehensive Perl Archive Network) site near
-your at
+older Perls.
 .PP
-.Vb 1
-\& http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.00.tar.gz
-.Ve
-or from my FTP site:
+FMRTG also requires several other Perl modules.  These are:
 .PP
-.Vb 1
-\&  ftp://ftp.gps.caltech.edu/pub/blair/Perl/Math-Interpolate-1.00.tar.gz
+.Vb 4
+\&  Math::IntervalSearch
+\&   Version 1.00 or greater.
+\&   ftp://ftp.gps.caltech.edu/pub/blair/Perl/Math-Interpolate-1.00.tar.gz
+\&   http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.00.tar.gz
+.Ve
+.Vb 3
+\&  Digest::MD5
+\&   Version 2.00 or greater.
+\&   http://www.perl.com/CPAN/authors/id/authors/id/GAAS/Digest-MD5-2.00.tar.gz
+.Ve
+.Vb 3
+\&  RRD
+\&   Version 19981122.22 or greater.
+\&   http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/3.0/
 .Ve
-Once you have downloaded the Math-Interpolate-1.00.tar.gz file, uncompress
-and install it using the following commands:
+The modules can be installed into your Perl tree with the following
+commands:
+.PP
+Math::Interval:
 .PP
 .Vb 6
 \&  % gunzip -c Math-Interpolate-1.00.tar.gz | tar xvf -
@@ -261,13 +270,17 @@
 \&  % make test
 \&  % make install
 .Ve
-The final component required by FMRTG is the RRD Perl library that comes
-with RRD.  Here, get RRD from:
+Digest::MD5
 .PP
-.Vb 1
-\&  http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/3.0
+.Vb 6
+\&  % gunzip -c Digest-MD5-2.00.tar.gz | tar xvf -
+\&  % cd Digest-MD5-2.00
+\&  % perl Makefile.PL
+\&  % make
+\&  % make test
+\&  % make install
 .Ve
-Get the most recent distribution and following the following steps:
+RRD:
 .PP
 .Vb 9
 \&  % gunzip -c mrtg-199?????.??.tar.gz | tar xvf -

Modified: trunk/orca/fmrtg/sample_configs/homesteaders.cfg
==============================================================================
--- trunk/orca/fmrtg/sample_configs/homesteaders.cfg	(original)
+++ trunk/orca/fmrtg/sample_configs/homesteaders.cfg	Sat Jul 13 18:20:15 2002
@@ -23,7 +23,7 @@
 
 html_top_title		GeoCities Homesteader & Member Growth
 
-html_page_top
+html_page_header
   <table border=0 cellspacing=0 cellpadding=0 width="100%">
     <tr>
       <td><a href="http://www.geocities.com">
@@ -42,7 +42,7 @@
   </table>
   <spacer type=vertical size=4>
 
-html_page_bottom
+html_page_footer
   <spacer type=vertical size=6>
   <table border=0 cellspacing=0 cellpadding=0>
     <tr>
@@ -81,7 +81,7 @@
     </tr>
   </table>
 
-html_page_bottom
+html_page_footer
   <spacer type=vertical size=20>
   <font face="Arial,Helvetica">
     Please email requests for enhancements, comments, or suggestions

Modified: trunk/orca/fmrtg/sample_configs/percollator.cfg
==============================================================================
--- trunk/orca/fmrtg/sample_configs/percollator.cfg	(original)
+++ trunk/orca/fmrtg/sample_configs/percollator.cfg	Sat Jul 13 18:20:15 2002
@@ -5,15 +5,16 @@
 #html_dir		/raid/lun36/admin/graphs/hosts
 
 #state_file		big.state
-#data_dir		../data/big
+#data_dir		../rrd_files/big
 #html_dir		/home/bzajac/public_html/mrtg/big
 
 #state_file		small.state
-#data_dir		../data/small
+#data_dir		../rrd_files/small
 #html_dir		/home/bzajac/public_html/mrtg/small
 
+base_dir		/home/bzajac/Code/MRTG/bzajac/percollator
 state_file		update.state
-data_dir		../data/update
+data_dir		./rrd_files
 html_dir		/home/bzajac/public_html/mrtg/update
 expire_gifs		1
 
@@ -55,11 +56,10 @@
 #	../(WWW1[18])/percol-\d{4}-\d{2}-\d{2}
 #	
 # update
-	../source/(sunridge)/percol-\d{4}-\d{2}-\d{2}
-	../source/(nfs-tb)/percol-\d{4}-\d{2}-\d{2}
+	./source/(.*)/percol-\d{4}-\d{2}-\d{2}
 
 column_description	first_line
-date_source		column timestamp
+date_source		column_name timestamp
 date_format		%s
 interval		300
 reopen			1
@@ -67,7 +67,7 @@
 
 html_top_title		GeoCities Host Status
 
-html_page_top
+html_page_header
   <table border=0 cellspacing=0 cellpadding=0 width="100%">
     <tr>
       <td><a href="http://www.geocities.com">
@@ -86,7 +86,7 @@
   </table>
   <spacer type=vertical size=4>
 
-html_page_bottom
+html_page_footer
   <spacer type=vertical size=6>
   <table border=0 cellspacing=0 cellpadding=0>
     <tr>
@@ -125,7 +125,7 @@
     </tr>
   </table>
 
-html_page_bottom
+html_page_footer
   <spacer type=vertical size=20>
   <font face="Arial,Helvetica">
     Please email requests for enhancements, comments, or suggestions

Modified: trunk/orca/fmrtg/sample_configs/keynote.cfg
==============================================================================
--- trunk/orca/fmrtg/sample_configs/keynote.cfg	(original)
+++ trunk/orca/fmrtg/sample_configs/keynote.cfg	Sat Jul 13 18:20:15 2002
@@ -2,5 +2,3 @@
 state_file	/home/bzajac/Data/time_gets/mrtg.state
 
 # By default: watch_directories = .
-
-watch_file

Modified: trunk/orca/fmrtg/README
==============================================================================
--- trunk/orca/fmrtg/README	(original)
+++ trunk/orca/fmrtg/README	Sat Jul 13 18:20:15 2002
@@ -51,20 +51,27 @@
     I have used only version version 5.005_02 of Perl with FMRTG.
     Because FMRTG makes very heavy use of references, it may or may
     not work with older versions of Perl. I welcome feedback if
-    FMRTG works with older Perls. FMRTG also requires
-    Math::IntervalSearch module which is included with the
-    Math::Interpolate module. Both modules are available for
-    download from a CPAN (Comprehensive Perl Archive Network) site
-    near your at
+    FMRTG works with older Perls.
 
-     http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.00.tar.gz
+    FMRTG also requires several other Perl modules. These are:
 
-    or from my FTP site:
+      Math::IntervalSearch
+       Version 1.00 or greater.
+       ftp://ftp.gps.caltech.edu/pub/blair/Perl/Math-Interpolate-1.00.tar.gz
+       http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.00.tar.gz
 
-      ftp://ftp.gps.caltech.edu/pub/blair/Perl/Math-Interpolate-1.00.tar.gz
+      Digest::MD5
+       Version 2.00 or greater.
+       http://www.perl.com/CPAN/authors/id/authors/id/GAAS/Digest-MD5-2.00.tar.gz
 
-    Once you have downloaded the Math-Interpolate-1.00.tar.gz file,
-    uncompress and install it using the following commands:
+      RRD
+       Version 19981122.22 or greater.
+       http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/3.0/
+
+    The modules can be installed into your Perl tree with the
+    following commands:
+
+    Math::Interval:
 
       % gunzip -c Math-Interpolate-1.00.tar.gz | tar xvf -
       % cd Math-Interpolate-1.00
@@ -73,13 +80,16 @@
       % make test
       % make install
 
-    The final component required by FMRTG is the RRD Perl library
-    that comes with RRD. Here, get RRD from:
+    Digest::MD5
 
-      http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/3.0
+      % gunzip -c Digest-MD5-2.00.tar.gz | tar xvf -
+      % cd Digest-MD5-2.00
+      % perl Makefile.PL
+      % make
+      % make test
+      % make install
 
-    Get the most recent distribution and following the following
-    steps:
+    RRD:
 
       % gunzip -c mrtg-199?????.??.tar.gz | tar xvf -
       % cd mrtg-199?????.??

Modified: trunk/orca/percollator/start_percol
==============================================================================
--- trunk/orca/percollator/start_percol	(original)
+++ trunk/orca/percollator/start_percol	Sat Jul 13 18:20:15 2002
@@ -2,9 +2,12 @@
 
 # This script runs percollator.se with the proper options for our site.
 
-# Set these variables.
-AWK=/usr/publib/bin/gawk
-STATSDIR=/usr/public/geocities/performance
+# Set these variables.  AWK is where your best version of awk lives.  This
+# should be preferably gawk, then nawk, and finall awk.  STATSDIR is the
+# base directory for the statistics.  Underneath STATSDIR is a bin/ and
+# stats_percollator/ directory.
+AWK=/usr/public/bin/gawk
+STATSDIR=/home/bzajac/Code/MRTG/bzajac/percollator
 
 # Get the real hostname without any trailing .*.
 uname=`/usr/bin/uname -n | /usr/bin/cut -d. -f1`

Modified: trunk/orca/percollator/restart_percol
==============================================================================
--- trunk/orca/percollator/restart_percol	(original)
+++ trunk/orca/percollator/restart_percol	Sat Jul 13 18:20:15 2002
@@ -3,7 +3,7 @@
 # This script runs percollator.se with the proper options for our site.
 
 # Set this variable.
-STATSDIR=/usr/public/geocities/performance
+STATSDIR=/home/bzajac/Code/MRTG/bzajac/percollator
 
 # Kill any running percollators.
 $STATSDIR/bin/stop_percol

Modified: trunk/orca/CHANGES
==============================================================================
--- trunk/orca/CHANGES	(original)
+++ trunk/orca/CHANGES	Sat Jul 13 18:20:15 2002
@@ -1,4 +1,18 @@
+Tue Dec  8 12:12:07 PST 1998
+
+	Update the sample FMRTG configuration files to work properly with
+	the configuration options in FMRTG.
+
+	Switch from MD5 to Digest::MD5, since it is faster.
+
+	Update the documentation to reflect the above changes.
+
+	Update the code documentation in fmrtg for date_source.
+
+	Add some more documentation to the percollator/start_percol script.
+
+	Version 0.11.
+
 Fri Dec  4 14:34:13 PST 1998
 
 	Version 0.10.
-




More information about the Orca-checkins mailing list