[Orca-checkins] rev 102 - in trunk/orca: . lib src

blair at orcaware.com blair at orcaware.com
Sat Jul 13 18:41:00 PDT 2002


Author: blair
Date: Fri, 28 Jun 2002 21:56:30 -0700
New Revision: 102

Added:
   trunk/orca/lib/rrdtool.gif
   trunk/orca/lib/rrdtool.gif.hex
Modified:
   trunk/orca/CHANGES
   trunk/orca/INSTALL
   trunk/orca/TODO
   trunk/orca/configure
   trunk/orca/configure.in
   trunk/orca/lib/Makefile.in
   trunk/orca/lib/percollator.se
   trunk/orca/src/orca.pl
   trunk/orca/src/start_percol.sh.in
Log:
Load orca-0.19 into trunk/orca.


Modified: trunk/orca/configure
==============================================================================
--- trunk/orca/configure	(original)
+++ trunk/orca/configure	Sat Jul 13 18:40:18 2002
@@ -18,7 +18,11 @@
 ac_help="$ac_help
    --with-perc-dir=DIR    directory were percollator output is stored"
 ac_help="$ac_help
-   --with-access-log=FILE location of the Common Log Format access log"
+   --with-ncsa-log=FILE   location of the NCSA style web server access log"
+ac_help="$ac_help
+   --with-proxy-log=FILE  location of the proxy NCSA style web server access log"
+ac_help="$ac_help
+   --with-squid-log=FILE  location of the Squid file"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -576,7 +580,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:580: checking host system type" >&5
+echo "configure:584: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -597,7 +601,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:601: checking target system type" >&5
+echo "configure:605: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -615,7 +619,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:619: checking build system type" >&5
+echo "configure:623: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -710,15 +714,19 @@
 )`
 
 
-# Check whether --with-access-log or --without-access-log was given.
-if test "${with_access_log+set}" = set; then
-  withval="$with_access_log"
+WATCH_HTTPD=
+NCSA_LOG=
+# Check whether --with-ncsa-log or --without-ncsa-log was given.
+if test "${with_ncsa_log+set}" = set; then
+  withval="$with_ncsa_log"
   
     case "$withval" in
       "" | y | ye | yes | n | no)
-         { echo "configure: error: *** You must supply an argument to the --with-access-log option." 1>&2; exit 1; }
+         { echo "configure: error: *** You must supply an argument to the --with-ncsa-log option." 1>&2; exit 1; }
          ;;
-      *) NCSAHTTPLOG="$withval"
+      *) WEB_LOG="$withval"
+         NCSA_LOG=yes
+         WATCH_HTTPD="-DWATCH_HTTPD"
          ;;
     esac
   
@@ -726,6 +734,53 @@
 fi
 
 
+PROXY_LOG=
+# Check whether --with-proxy-log or --without-proxy-log was given.
+if test "${with_proxy_log+set}" = set; then
+  withval="$with_proxy_log"
+  
+    if test "$NCSA_LOG"; then
+      { echo "configure: error: *** You cannot use both --with-ncsa-log and --with-proxy-log." 1>&2; exit 1; }
+    fi
+    case "$withval" in
+      "" | y | ye | yes | n | no)
+         { echo "configure: error: *** You must supply an argument to the --with-proxy-log option." 1>&2; exit 1; }
+         ;;
+      *) WEB_LOG="$withval"
+         PROXY_LOG=yes
+         WATCH_HTTPD="-DWATCH_HTTPD -DWATCH_PROXY"
+         ;;
+    esac
+  
+
+fi
+
+
+# Check whether --with-squid-log or --without-squid-log was given.
+if test "${with_squid_log+set}" = set; then
+  withval="$with_squid_log"
+  
+    if test "$NCSA_LOG"; then
+      { echo "configure: error: *** You cannot use both --with-ncsa-log and --with-squid-log." 1>&2; exit 1; }
+    fi
+    if test "$PROXY_LOG"; then
+      { echo "configure: error: *** You cannot use both --with-proxy-log and --with-squid-log." 1>&2; exit 1; }
+    fi
+    case "$withval" in
+      "" | y | ye | yes | n | no)
+         { echo "configure: error: *** You must supply an argument to the --with-squid-log option." 1>&2; exit 1; }
+         ;;
+      *) WEB_LOG="$withval"
+         WATCH_HTTPD="-DWATCH_HTTPD -DWATCH_SQUID"
+         ;;
+    esac
+  
+
+fi
+
+
+
+
 
 if test "$program_transform_name" = s,x,x,; then
   program_transform_name=
@@ -751,7 +806,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:755: checking for $ac_word" >&5
+echo "configure:810: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -789,7 +844,7 @@
 # Extract the first word of "cut", so it can be a program name with args.
 set dummy cut; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:793: checking for $ac_word" >&5
+echo "configure:848: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CUT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -825,7 +880,7 @@
 # Extract the first word of "expr", so it can be a program name with args.
 set dummy expr; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:829: checking for $ac_word" >&5
+echo "configure:884: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_EXPR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -861,7 +916,7 @@
 # Extract the first word of "se", so it can be a program name with args.
 set dummy se; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:865: checking for $ac_word" >&5
+echo "configure:920: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -896,7 +951,7 @@
 # Extract the first word of "uname", so it can be a program name with args.
 set dummy uname; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:900: checking for $ac_word" >&5
+echo "configure:955: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_UNAME'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -936,7 +991,7 @@
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:940: checking for $ac_word" >&5
+echo "configure:995: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -973,7 +1028,7 @@
   PERL="$PERL -w"
   
   echo $ac_n "checking if '$PERL' will run Perl scripts""... $ac_c" 1>&6
-echo "configure:977: checking if '$PERL' will run Perl scripts" >&5
+echo "configure:1032: checking if '$PERL' will run Perl scripts" >&5
   rm -f conftest.BZ
   cat > conftest.BZ <<EOF
 #!$PERL
@@ -1179,7 +1234,8 @@
 s%@RRD_DIR@%$RRD_DIR%g
 s%@HTML_DIR@%$HTML_DIR%g
 s%@PERCOLLATOR_DIR@%$PERCOLLATOR_DIR%g
-s%@NCSAHTTPLOG@%$NCSAHTTPLOG%g
+s%@WATCH_HTTPD@%$WATCH_HTTPD%g
+s%@WEB_LOG@%$WEB_LOG%g
 s%@AWK@%$AWK%g
 s%@CUT@%$CUT%g
 s%@EXPR@%$EXPR%g
@@ -1307,6 +1363,6 @@
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
 
-if test -z "$NCSAHTTPLOG"; then
-  echo "configure: warning: *** Unless you use --with-access_log you will not gather WWW access log data." 1>&2
+if test -z "$WEB_LOG"; then
+  echo "configure: warning: *** Unless you use a --with-*-log option you will not gather WWW log data." 1>&2
 fi

Modified: trunk/orca/TODO
==============================================================================
--- trunk/orca/TODO	(original)
+++ trunk/orca/TODO	Sat Jul 13 18:40:19 2002
@@ -13,7 +13,7 @@
 	Make plots from multiple files sets: delete source files_key and put
 		it into data.
 	Update HTML files if a new file is found with a new group.
+	Update percollator.cfg.in for caching and proxy stuff.
 
 percollator.se:
 	Better documentation.
-	Update using 3.1 diffs from 3.0.

Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in	(original)
+++ trunk/orca/configure.in	Sat Jul 13 18:40:19 2002
@@ -65,19 +65,64 @@
 )`
 AC_SUBST(PERCOLLATOR_DIR)
 
-AC_ARG_WITH(access-log,
-  [   --with-access-log=FILE location of the Common Log Format access log],
+WATCH_HTTPD=
+NCSA_LOG=
+AC_ARG_WITH(ncsa-log,
+  [   --with-ncsa-log=FILE   location of the NCSA style web server access log],
   [
     case "$withval" in
       "" | y | ye | yes | n | no)
-         AC_MSG_ERROR([*** You must supply an argument to the --with-access-log option.])
+         AC_MSG_ERROR([*** You must supply an argument to the --with-ncsa-log option.])
          ;;
-      *) NCSAHTTPLOG="$withval"
+      *) WEB_LOG="$withval"
+         NCSA_LOG=yes
+         WATCH_HTTPD="-DWATCH_HTTPD"
          ;;
     esac
   ]
 )
-AC_SUBST(NCSAHTTPLOG)
+
+PROXY_LOG=
+AC_ARG_WITH(proxy-log,
+  [   --with-proxy-log=FILE  location of the proxy NCSA style web server access log],
+  [
+    if test "$NCSA_LOG"; then
+      AC_MSG_ERROR([*** You cannot use both --with-ncsa-log and --with-proxy-log.])
+    fi
+    case "$withval" in
+      "" | y | ye | yes | n | no)
+         AC_MSG_ERROR([*** You must supply an argument to the --with-proxy-log option.])
+         ;;
+      *) WEB_LOG="$withval"
+         PROXY_LOG=yes
+         WATCH_HTTPD="-DWATCH_HTTPD -DWATCH_PROXY"
+         ;;
+    esac
+  ]
+)
+
+AC_ARG_WITH(squid-log,
+  [   --with-squid-log=FILE  location of the Squid file],
+  [
+    if test "$NCSA_LOG"; then
+      AC_MSG_ERROR([*** You cannot use both --with-ncsa-log and --with-squid-log.])
+    fi
+    if test "$PROXY_LOG"; then
+      AC_MSG_ERROR([*** You cannot use both --with-proxy-log and --with-squid-log.])
+    fi
+    case "$withval" in
+      "" | y | ye | yes | n | no)
+         AC_MSG_ERROR([*** You must supply an argument to the --with-squid-log option.])
+         ;;
+      *) WEB_LOG="$withval"
+         WATCH_HTTPD="-DWATCH_HTTPD -DWATCH_SQUID"
+         ;;
+    esac
+  ]
+)
+
+AC_SUBST(WATCH_HTTPD)
+AC_SUBST(WEB_LOG)
 
 AC_ARG_PROGRAM
 AC_PATH_PROGS(AWK,mawk gawk nawk awk)
@@ -121,6 +166,6 @@
 	  docs/Makefile
 	  Makefile)
 
-if test -z "$NCSAHTTPLOG"; then
-  AC_MSG_WARN([*** Unless you use --with-access_log you will not gather WWW access log data.])
+if test -z "$WEB_LOG"; then
+  AC_MSG_WARN([*** Unless you use a --with-*-log option you will not gather WWW log data.])
 fi

Modified: trunk/orca/lib/Makefile.in
==============================================================================
--- trunk/orca/lib/Makefile.in	(original)
+++ trunk/orca/lib/Makefile.in	Sat Jul 13 18:40:19 2002
@@ -4,7 +4,7 @@
 MKDIR		= @MKDIR@
 INSTALL		= @INSTALL@
 
-all:	percollator.cfg orca.gif.hex
+all:	percollator.cfg orca.gif.hex rrdtool.gif.hex
 
 percollator.cfg: percollator.cfg.in
 	cd ..; ./config.status
@@ -14,6 +14,11 @@
 orca.gif.hex: orca.gif
 	perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*", $$b),"\n"}' < $< > $@
 
+# Create a hex file representation of rrdtool.gif that can be stored inside
+# orca.pl.
+rrdtool.gif.hex: rrdtool.gif
+	perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*", $$b),"\n"}' < $< > $@
+
 install: all
 	$(MKDIR) $(libdir)
 	-cp -p $(libdir)/percollator.cfg $(libdir)/percollator.cfg.`date +%Y-%m-%d-%H:%M:%S`

Added: trunk/orca/lib/rrdtool.gif
==============================================================================
Binary files trunk/orca/lib/rrdtool.gif	(original) and trunk/orca/lib/rrdtool.gif differ

Modified: trunk/orca/lib/percollator.se
==============================================================================
--- trunk/orca/lib/percollator.se	(original)
+++ trunk/orca/lib/percollator.se	Sat Jul 13 18:40:20 2002
@@ -1,15 +1,19 @@
-/*
- * Percollator.se, a log generating performance monitor.
- *
- * This program logs many different system quantities to a log file
- * for later processing.
- */
- 
-/*
- * Author: Blair Zajac <bzajac at geostaff.com>
- *
- * Portions copied from percollator.se written by Adrian Cockroft.
- */
+//
+// Percollator.se, a log generating performance monitor.
+//
+// This program logs many different system quantities to a log file
+// for later processing.
+//
+// Author: Blair Zajac <bzajac at geostaff.com>
+//
+// Portions copied from percollator.se written by Adrian Cockroft.
+//
+// Version 1.4: Feb 19, 1999	Handle missing HTTP/1.x in access log.
+// Version 1.3: Feb 18, 1999	On busy machines httpops5 will be enlarged.
+// Version 1.2: Feb 18, 1999	Output data on integral multiples of interval.
+// Version 1.1:	Feb 18, 1999	Integrate Squid log processing from SE 3.1.
+// Version 1.0:	Sep 9, 1998	Initial version.
+//
 
 // The default sampling interval in seconds.
 #define SAMPLE_INTERVAL		300
@@ -96,48 +100,61 @@
 int    hz;				// Clock tick rate.
 int    page_size;			// Page size in bytes.
 long   boot_time;			// Boot time of the system.
-ulong  interval = SAMPLE_INTERVAL;	// Sampling interval. 
+long   interval = SAMPLE_INTERVAL;	// Sampling interval. 
 
 // Variables for handling the httpd access log.
 #ifdef WATCH_HTTPD
-ulong  log_file;
-string log_name    = getenv("NCSAHTTPLOG");
-string log_gateway = getenv("GATEWAY");
-uint   log_gatelen;
-stat_t log_stat[1];
-ulong  log_ino;
-long   log_size;
-double log_interval;			// Hi-res interval time.
-ulong  interval5;			// Sampling interval divided by 5.
-
-double httpops;
-double httpops5;
-double gateops;
-double lastops;
-double dtmp;
-
-long   httpop_gets;
-long   httpop_condgets; /* HEAD or code = 304 conditional get no data */
-long   httpop_posts;
-long   httpop_cgi_bins;
-long   httpop_searches;
-long   httpop_errors;
-string search_url;
-long   dwnld_size[5]; /* [0] < 1K, [1] < 10K, [2] < 100K, [3] < 1M, [4] >= 1M */
-long   dwnld_totalz;  /* total size counted from log */
+ulong     log_file;
+string    log_name    = getenv("WEB_LOG");
+string    log_gateway = getenv("GATEWAY");
+uint      log_gatelen;
+stat_t    log_stat[1];
+ulong     log_ino;
+long      log_size;
 
+double    log_interval;			// Hi-res interval time.
 ulonglong log_then;
 ulonglong log_now;
 
+double    log5_interval;		// Actual hi-res 5 second interval.
+ulonglong log5_then;
+ulonglong log5_now;
+
+double    httpops;
+double    httpops5;
+double    gateops;
+double    dtmp;
+
+long      httpop_gets;
+long      httpop_condgets; // HEAD or code = 304 conditional get no data.
+long      httpop_posts;
+long      httpop_cgi_bins;
+long      httpop_searches;
+long      httpop_errors;
+string    search_url;
+long      dwnld_size[5]; // [0] < 1K, [1] < 10K, [2] < 100K, [3] < 1M, [4] >= 1M
+long      dwnld_totalz;  // total size counted from log
+
+#if WATCH_PROXY || WATCH_SQUID
+double    prxy_squid_xfer_sum;		// transfer time
+double    prxy_squid_xfer_by_size[5];	// mean transfer time by size bin
+long      prxy_squid_indirect;		// number of hits that go via PROXY,SOCKS,parent
+long      prxy_squid_cache_hits;	// number of hits returned from cache
+#endif
+
 #ifdef WATCH_PROXY
-double    prxy_xfer_sum;     /* transfer time */
-double    prxy_xfer_by_size[5];      /* mean transfer time by size bin */
-long      prxy_indirect;     /* number of hits that go via PROXY or SOCKS */
-long      prxy_cache_hits;   /* number of hits returned from cache */
-long      prxy_cache_writes; /* number of writes and updates to cache */
-long      prxy_uncacheable;  /* number of explicitly uncacheable httpops */
-                            /* any extra is errors or incomplete ops */
+long      prxy_cache_writes;	// number of writes and updates to cache
+long      prxy_uncacheable;	// number of explicitly uncacheable httpops
+				// any extra is errors or incomplete ops
 #endif
+
+#ifdef WATCH_SQUID
+long      squid_cache_misses;
+long      squid_icp_requests;
+long      squid_icp_queries;
+long      squid_client_http;
+#endif
+
 #endif
 
 // Variables for handling output.
@@ -154,17 +171,12 @@
 // Add one column of comments and data to the buffers.
 put_output(string comment, string data)
 {
-  int comment_length;
-  int data_length;
-
   if (current_column >= MAX_COLUMNS) {
     fprintf(stderr, "%s: too many columns (%d).  Increase MAX_COLUMNS.\n",
     	    program_name, current_column);
     exit(1);
   }
 
-  comment_length = strlen(comment);
-  data_length    = strlen(data);
   col_comment[current_column] = comment;
   col_data[current_column]    = data;
   ++current_column;
@@ -233,6 +245,7 @@
   utsname_t u[1];
   ulong     ofile;	// File pointer to the logging file.
   long      now;
+  long      sleep_till;	// Time to sleep to.
   tm_t      tm_now;
 
   // Get the nodename of the machine.
@@ -251,12 +264,14 @@
     default:
       fprintf(stderr, "usage: se [Defines] %s [interval]\n", program_name);
       fprintf(stderr, "%s can use the following environmental variables:\n", program_name);
-      fprintf(stderr, "   setenv NCSAHTTPLOG /ns-home/httpd-80/logs/access - location of access log\n");
+      fprintf(stderr, "   setenv WEB_LOG     /ns-home/httpd-80/logs/access - location of web server log\n");
       fprintf(stderr, "   setenv GATEWAY     some.where.com - special address to monitor\n");
       fprintf(stderr, "   setenv OUTDIR      /ns-home/docs/percollator/logs - default stdout\n");
       fprintf(stderr, "   setenv SEARCHURL   srch.cgi - match for search scripts, default is search.cgi\n");
       fprintf(stderr, "Defines:\n");
       fprintf(stderr, "   -DWATCH_HTTPD watch httpd access log\n");
+      fprintf(stderr, "   -DWATCH_PROXY use WEB_LOG as a NCSA style proxy log\n");
+      fprintf(stderr, "   -DWATCH_SQUID use WEB_LOG as a Squid log\n");
       fprintf(stderr, "   -DWATCH_OS    includes all of the below:\n");
       fprintf(stderr, "   -DWATCH_CPU   watch the cpu load, run queue, etc\n");
       fprintf(stderr, "   -DWATCH_MUTEX watch the number of mutex spins\n");
@@ -271,26 +286,30 @@
       break;
   }
 
-#ifdef WATCH_HTTPD
-  // Calculate the interval time divided by 5.  Make sure it is not less
-  // than 1.
-  interval5 = interval/5;
-  if (interval5 < 1) {
-    interval5 = 1;
-  }
-#endif
-
   // Initialize the various structures.
   initialize();
 
-  // Run forever.  If WATCH_HTTPD is defined, then have the measure_httpd()
-  // function do the sleeping while it is watching the access log file.  Also,
-  // collect the data from the access log file before printing any output.
-  // If WATCH_HTTPD is not defined, then collect the data immediately and then
-  // do the sleep.
+  // Run forever.  If WATCH_HTTPD is defined, then have measure_httpd()
+  // do the sleeping while it is watching the access log file until the
+  // next update time for the whole operating system.  Also, collect the
+  // data from the access log file before printing any output.
   for (;;) {
+    // Calculate the next time to sleep to that is an integer multiple of
+    // the interval time.  Make sure that at least half of the interval
+    // passes before waking up.
+    now = time(0);
+    sleep_till = (now/interval)*interval;
+    while (now + interval*0.5 > sleep_till) {
+      sleep_till += interval;
+    }
+
 #ifdef WATCH_HTTPD
-    measure_httpd();
+    measure_httpd(sleep_till);
+#else
+    while (now < sleep_till) {
+      sleep(sleep_till - now);
+      now = time(0);
+    }
 #endif
 
     // Reset the output.
@@ -311,22 +330,14 @@
 
     // Print the output.
     print_columns(ofile, col_data);
-
-#ifndef WATCH_HTTPD
-    sleep(interval);
-#endif
   }
   return 0;
 }
 
 initialize()
 {
-  // Sleep to give the disks a chance to update.  Only do this if we are
-  // not reading the httpd access log file, because that does at least 5
-  // seconds worth of sleeping.
-#ifndef WATCH_HTTPD
+  // Sleep to give the disks a chance to update.
   sleep(DISK_UPDATE_RATE);
-#endif
 
   // Get the clock tick rate.
   hz = sysconf(_SC_CLK_TCK);
@@ -360,7 +371,8 @@
     fseek(log_file, 0, 2);
   }
 
-  log_then = gethrtime();
+  log_then  = gethrtime();
+  log5_then = log_then;
 #endif
 
   // Perform the first measurement of the system.
@@ -462,7 +474,7 @@
   }
 }
 
-handle_misc(ulong now, tm_t tm_now)
+handle_misc(long now, tm_t tm_now)
 {
   long   uptime;
   char   states[12];
@@ -496,8 +508,11 @@
   p_vmstat pvm;
 
   pvm = vmglobal_total();
-  put_output("usr%",   sprintf("%4d",   pvm.user_time));
-  put_output("sys%",   sprintf("%4d",   pvm.system_time));
+
+  // In SE 3.0 user_time and system_time are int and in SE 3.1 they are
+  // double, so cast everything to double using + 0.0.
+  put_output("usr%",   sprintf("%4.0f", pvm.user_time + 0.0));
+  put_output("sys%",   sprintf("%4.0f", pvm.system_time + 0.0));
   put_output(" 1load", sprintf("%6.2f", tmp_kstat_misc.avenrun_1min/256.0));
   put_output(" 5load", sprintf("%6.2f", tmp_kstat_misc.avenrun_5min/256.0));
   put_output("15load", sprintf("%6.2f", tmp_kstat_misc.avenrun_15min/256.0));
@@ -639,14 +654,110 @@
 	string	word;
 	int	z;
 	int	ishead;
-#ifdef WATCH_PROXY
+#if WATCH_PROXY || WATCH_SQUID
 	double	xf;
+#ifdef WATCH_SQUID
+	string logtag;
+	string request;
+#endif
 #endif
 	ishead = 0;
-	word = strtok(buf," ");		/* address */
+	word = strtok(buf," ");
 	if (word == nil) {
 		return;
+	}
+#ifdef WATCH_SQUID
+	/* word contains unix time in seconds.milliseconds */
+	word = strtok(nil, " ");	/* elapsed request time in ms */
+	xf = atof(word)/1000.0;
+	prxy_squid_xfer_sum += xf;
+#ifdef DINKY
+	printf("time: %s %f total %f\n", word, xf, xfer_sum);
+#endif
+	word = strtok(nil, " ");	/* client IP address */
+	logtag = strtok(nil, "/");	/* Log tag */
+	word = strtok(nil, " ");	/* reply code */
+	if (word != nil) {
+                if (strstr(word,"304") != nil) {
+                        httpop_condgets++;
+                }
+                if (strncmp(word, "4", 1) == 0 || strncmp(word, "5", 1) == 0) {
+                        httpop_errors++;
+                }
+        }
+        word = strtok(nil, " ");        /* size sent to client */
+        z = atoi(word);
+        request = strtok(nil, " ");     /* Request method */
+        word = strtok(nil, " ");         /* URL */
+        if (word != nil) {
+                if (strstr(word,"cgi-bin") != nil) {
+                        httpop_cgi_bins++;
+                }
+                if (strstr(word, search_url) != nil) {
+                        httpop_searches++;
+                }
+        }
+        word = strtok(nil, " ");        /* optional user ident */
+        word = strtok(nil, "/");        /* Hierarchy */
+	if (word != nil) {
+		if (strstr(word, "DIRECT") == nil) {
+			prxy_squid_indirect++;
 		}
+	}
+        word = strtok(nil, " ");        /* Hostname */
+        word = strtok(nil, " ");        /* content-type */
+
+	/* process the collected data */
+	if (strstr(logtag, "TCP") != nil) {
+		squid_client_http++;
+	}
+	if (strstr(logtag, "UDP") != nil) {
+		squid_icp_requests++;
+	}
+	if (strstr(logtag, "HIT") != nil) {
+		prxy_squid_cache_hits++;
+	}
+	if (strstr(logtag, "MISS") != nil) {
+		squid_cache_misses++;
+	}
+	switch(request) {
+                case "GET":
+                        httpop_gets++;
+                        break;
+                case "POST":
+                        httpop_posts++;
+                        break;
+                case "HEAD":
+                        ishead = 1;
+                        httpop_condgets++;
+                        break;
+		case "ICP_QUERY":
+			squid_icp_queries++;
+                default: break;
+        }
+        if (ishead == 0) {      /* don't add size if its a HEAD */
+                dwnld_totalz += z;
+        }
+        if (z < 1024) {
+                size_index=0;           /* under 1K */
+        } else {
+                if (z < 10240) {
+                        size_index=1; /* under 10K */
+                } else {
+                        if (z < 102400) {
+                                size_index=2; /* under 100K */
+                        } else {
+                                if (z < 1048576) {
+                                        size_index=3; /* < 1MB */
+                                } else {
+                                        size_index=4; /* >= 1MB */
+                                }
+                        }
+                }
+        }
+        dwnld_size[size_index]++;
+        prxy_squid_xfer_by_size[size_index] += xf;
+#else	/* common or netscape proxy formats */
 	strtok(nil, " ");	/* - */
 	strtok(nil, " ");	/* - */
 	strtok(nil, " [");	/* date */
@@ -666,7 +777,8 @@
 			ishead = 1;
 			httpop_condgets++;
 			break;
-		default: break; 
+		default:
+			break; 
 	}
 	word = strtok(nil, " ");	/* URL */
 	if (word != nil) {
@@ -677,20 +789,28 @@
 			httpop_searches++;
 		}
 	}
-	strtok(nil, " ");	/* HTTP/1.x" */
-	word = strtok(nil, " ");	/* error/success code */
+	// Sometimes HTTP/1.x is not listed in the access log.  Skip it
+	// if it does exist.  Load the error/success code.
+	word = strtok(nil, " ");
 	if (word != nil) {
-                if (strstr(word,"304") != nil) {
-                        httpop_condgets++;
-                }
-                if (strncmp(word, "4", 1) == 0 || strncmp(word, "5", 1) == 0) {
-                        httpop_errors++;
-                }
+		if (strstr(word, "HTTP") != nil || strstr(word, "http") != nil) {
+			word = strtok(nil, " ");
+		}
 	}
-        word = strtok(nil, " ");	/* bytes transferred */
-        if (word != nil) {
+	if (word != nil) {
+		if (strstr(word,"304") != nil) {
+			httpop_condgets++;
+		}
+		else {
+			if (strncmp(word, "4", 1) == 0 || strncmp(word, "5", 1) == 0) {
+				httpop_errors++;
+			}
+		}
+	}
+	word = strtok(nil, " ");	// bytes transferred
+	if (word != nil) {
 		z = atoi(word);
-		if (ishead == 0) {	/* don't add size if its a HEAD */
+		if (ishead == 0) {	// don't add size if its a HEAD
 			dwnld_totalz += z;
 		}
 		if ((z % 1024) == z) {
@@ -726,7 +846,7 @@
         if (word != nil) {	/* - DIRECT PROXY(host.domain:port) SOCKS */
                 if (strncmp(word, "PROXY", 5) == 0 ||
                          strncmp(word, "SOCKS", 5) == 0) {
-                         prxy_indirect++;
+                         prxy_squid_indirect++;
 		}
 	}
         word = strtok(nil, " ");        /* client finish status */
@@ -743,7 +863,7 @@
 			case "CL-MISMATCH": prxy_cache_writes++;
 					break;
 			case "NO-CHECK":
-			case "UP-TO-DATE":  prxy_cache_hits++;
+			case "UP-TO-DATE":  prxy_squid_cache_hits++;
 					break;
 			case "DO-NOT-CACHE":
 			case "NON-CACHEABLE": prxy_uncacheable++;
@@ -754,20 +874,22 @@
         word = strtok(nil, " [");       /* [transfer total time x.xxx */
         if (word != nil) {
                 xf = atof(word);
-		prxy_xfer_by_size[size_index] += xf;
-		prxy_xfer_sum += xf;
+		prxy_squid_xfer_by_size[size_index] += xf;
+		prxy_squid_xfer_sum += xf;
 	}
 #endif
+#endif
 }
 
-measure_httpd()
+measure_httpd(long sleep_till)
 {
-  char      buf[BUFSIZ];
-  int       i;
+  double lastops = 0.0;
+  char   buf[BUFSIZ];
+  int    i;
+  long   now;
 
   httpops         = 0.0;
   httpops5        = 0.0;
-  lastops         = 0.0;
   gateops         = 0.0;
   httpop_gets     = 0;
   httpop_condgets = 0;
@@ -778,22 +900,29 @@
 
   for (i=0; i<5; i++) {
     dwnld_size[i] = 0;
-#ifdef WATCH_PROXY
-    prxy_xfer_by_size[i] = 0.0;
+#if WATCH_PROXY || WATCH_SQUID
+    prxy_squid_xfer_by_size[i] = 0.0;
 #endif
   }
   dwnld_totalz = 0;
 
+#if WATCH_PROXY || WATCH_SQUID
+  prxy_squid_xfer_sum   = 0.0;
+  prxy_squid_indirect   = 0;
+  prxy_squid_cache_hits = 0;
 #ifdef WATCH_PROXY
-  prxy_xfer_sum     = 0.0;
-  prxy_indirect     = 0;
-  prxy_cache_hits   = 0;
-  prxy_cache_writes = 0;
-  prxy_uncacheable  = 0;
+  prxy_cache_writes      = 0;
+  prxy_uncacheable       = 0;
+#else
+  squid_cache_misses      = 0;
+  squid_icp_requests      = 0;
+  squid_icp_queries       = 0;
+  squid_client_http       = 0;
+#endif
 #endif
 
   if (log_name != nil) {
-    for (i=0; i<interval/5; ++i) {
+    while (time(0) < sleep_till) {
       sleep(5);
       if (log_file != 0) {
         while (fgets(buf, BUFSIZ, log_file) != nil) {
@@ -829,21 +958,32 @@
         }
       }
 
-      log_size = log_stat[0].st_size;    /* remember size for next time */
-      if (httpops - lastops > httpops5) {
-        httpops5 = httpops - lastops;
+      log5_now      = gethrtime();
+      log5_interval = (log5_now - log5_then) * 0.000000001;
+      log5_then     = log5_now;
+      dtmp          = (httpops - lastops)/log5_interval;
+      if (dtmp > httpops5) {
+        httpops5 = dtmp;
       }
       lastops = httpops;
+
+      // Remember size for next time.
+      log_size = log_stat[0].st_size;
     }
   }
   else {
-    sleep(interval);
+    now = time(0);
+    while (now < sleep_till) {
+      sleep(sleep_till - now);
+      now = time(0);
+    }
   }
 
   log_now      = gethrtime();
   log_interval = (log_now - log_then) * 0.000000001;
   log_then     = log_now;
 
+  // Use dtmp to get percentages.
   if (httpops == 0.0) {
     dtmp = 0.0;
   }
@@ -851,13 +991,13 @@
     dtmp = 100.0 / httpops;
   }
 
-#ifdef WATCH_PROXY
+#if WATCH_PROXY || WATCH_SQUID
   for (i=0; i<5; ++i) {
     if (dwnld_size[i] == 0) {
-      prxy_xfer_by_size[i] = 0.0;
+      prxy_squid_xfer_by_size[i] = 0.0;
     }
     else {
-      prxy_xfer_by_size[i] = prxy_xfer_by_size[i]/dwnld_size[i];
+      prxy_squid_xfer_by_size[i] = prxy_squid_xfer_by_size[i]/dwnld_size[i];
     }
   }
 #endif
@@ -941,7 +1081,7 @@
 {
   put_output("#httpds",   sprintf("%7ld",  count_proc("httpd")));
   put_output("httpop/s",  sprintf("%8.2f", httpops/log_interval));
-  put_output("http/p5s",  sprintf("%8.2f", httpops5/5.0));
+  put_output("http/p5s",  sprintf("%8.2f", httpops5));
   put_output("cndget/s",  sprintf("%8.2f", httpop_condgets/log_interval));
   put_output("search/s",  sprintf("%8.3f", httpop_searches/log_interval));
   put_output("   cgi/s",  sprintf("%8.3f", httpop_cgi_bins/log_interval));
@@ -953,18 +1093,23 @@
   put_output("  %to1MB",  sprintf("%8.2f", dtmp*dwnld_size[3]));
   put_output("%over1MB",  sprintf("%8.2f", dtmp*dwnld_size[4]));
   put_output(log_gateway, sprintf("%8.2f", gateops/log_interval));
-
+#if WATCH_PROXY || WATCH_SQUID
+  put_output("  %indir",  sprintf("%8.2f", dtmp * prxy_squid_indirect));
+  put_output("%cch_hit",  sprintf("%8.2f", dtmp * prxy_squid_cache_hits));
 #ifdef WATCH_PROXY
-  put_output("  %indir", sprintf("%8.2f", dtmp * prxy_indirect));
-  put_output("%cch_hit", sprintf("%8.2f", dtmp * prxy_cache_hits));
-  put_output("%cch_wrt", sprintf("%8.2f", dtmp * prxy_cache_writes));
-  put_output("%cch_unc", sprintf("%8.2f", dtmp * prxy_uncacheable));
-  put_output("   xfr_t", sprintf("%8.2f", 0.01 * dtmp * prxy_xfer_sum));
-  put_output("  xfr1_t", sprintf("%8.2f", prxy_xfer_by_size[0]));
-  put_output(" xfr10_t", sprintf("%8.2f", prxy_xfer_by_size[1]));
-  put_output("xfr100_t", sprintf("%8.2f", prxy_xfer_by_size[2]));
-  put_output(" xfr1M_t", sprintf("%8.2f", prxy_xfer_by_size[3]));
-  put_output("xfro1M_t", sprintf("%8.2f", prxy_xfer_by_size[4]));
+  put_output("%cch_wrt",  sprintf("%8.2f", dtmp * prxy_cache_writes));
+  put_output("%cch_unc",  sprintf("%8.2f", dtmp * prxy_uncacheable));
+#else
+  put_output("%cch_mis",  sprintf("%8.2f", dtmp * squid_cache_misses));
+  put_output("%cch_req",  sprintf("%8.2f", dtmp * squid_icp_requests));
+  put_output("%cch_qry",  sprintf("%8.2f", dtmp * squid_icp_queries));
+#endif
+  put_output("   xfr_t",  sprintf("%8.2f", 0.01 * dtmp * prxy_squid_xfer_sum));
+  put_output("  xfr1_t",  sprintf("%8.2f", prxy_squid_xfer_by_size[0]));
+  put_output(" xfr10_t",  sprintf("%8.2f", prxy_squid_xfer_by_size[1]));
+  put_output("xfr100_t",  sprintf("%8.2f", prxy_squid_xfer_by_size[2]));
+  put_output(" xfr1M_t",  sprintf("%8.2f", prxy_squid_xfer_by_size[3]));
+  put_output("xfro1M_t",  sprintf("%8.2f", prxy_squid_xfer_by_size[4]));
 #endif
 }
 #endif

Added: trunk/orca/lib/rrdtool.gif.hex
==============================================================================
--- trunk/orca/lib/rrdtool.gif.hex	(original)
+++ trunk/orca/lib/rrdtool.gif.hex	Sat Jul 13 18:40:21 2002
@@ -0,0 +1,51 @@
+749464837316870022003f0000000066003399046699e375c864284bf7f73b9a9a9a08
+99ccfbccccffffccffffff7f7f7f7e7e7e000000000000000000c20000000087002200
+0040ef099c94badb83be9b63fbd57c882e866790ac4abe93e292c5032016fd87eafe97
+d44d04b5050342a1f88c4627020663f9fc184b92daa5fa2d0c0201010081cb0b87c4e2
+39d7fb4bad8f302b78965e1fb6eabdbd7cd11b7b777e3ed61727d738a44763909806c3
+905040b077c360984990b390b7738928399043d78784694090e458445a947840c0e890
+70c30b4a5370b9a78386a3d84050e6969a7460e73963b274e430c060d53060304ad505
+a58c250090c5c564ba8920214080e8cafdb8b9d21e2460c080f360cadaa330691421db
+20909e2cdd80f62fd469fc8fe9922109e05579f4dd0c841a10669dc0a1c46bd1851f3e
+5df084504ed20a53a0705436efb2a04d24304645d86491b71ac4080a917bd30c2e93bb
+74a69923203023a0c007f40618c883d351892694854c544ae0c4cd761de55ca844642e
+a7989491aac424af940225071839254ac49e4229cc041410913082362c3506a3e265b9
+130e93d4a06200cc65d6444ddad93dfbb9a06e8d4e4f6a35041f4885528c02e139878a
+c49db86c376872906379900e98a65079bc899ee3e004aa4d15d403bbd1045f4de119c8
+85d5f5d5cf23d426ea4320020a16ade13106efa08617df61b9ad56b525d5b47f5c00e5
+cb2a3b0086ea542ea8d780ee1540c43a6a035cd8c35956d48ef2a23bcdeed4afe0c1da
+afb7d5ed7395f40ad243ec6f0db69b6b9de6647ee547ef7408250b00160ca350af5cac
+b6c0ca617cc09fcf4c51c1401e140895d6895de8319f8114a973f89c534d6181600ec4
+333c907409102c533875519e4b830c71425f0088f00acb17a4121a0212914184c43465
+f73585157d07b5c616c17195c610d55143a919b40248cd0b36e154c597cc09f854154e
+79946d594e513d80900453206f884801a6a6964cf827488d5e5134631b4a5145819b42
+6355861b7639650d8200c240e25a45d314028a412080c1a04e0acbc10f3d1a831c9dc8
+4af356aa9ef454271fdc20a0083c42999dc441ae10c7af9db832e8c8a36200b19e3408
+20a04b27008a4b22a3b6234be2a4b6da15820e80dab04108001b32e137c6dab0ef4b4f
+be2b37561be0dace4fa3a2636c2302c2a54b220c4271a0c584b227242a9c443aba920b
+a545a0c2009811a04d07ca09de670d54005c6ab8ae618be108cc667048b1081bef68a7
+66dae763b00820a4e0cdde7ba61300ba079d0da371635c6f22c6d5e50a9440ab40f11e
+e20bb958bec2231038a448a529e73ef631504bb1ee41b99a3c505a6c27150c2007514a
+0c29327b810c253ba17f508aed2719fecad1f89e1b0002babf6e8cd259c8696b8c4cca
+27dc22dca8aad95fec546523958843ca7bb584c30cfceec99b99a523363c6320b08bdb
+5cdaa2700b07e460c6c85cc8f943a204fae1acc5f400f3b6bf3395a5f2ea696caee07a
+6d8ce56f9600aaeff0763ab51cb1fb034b1e30fc584be6de2f25f2aa88f334d699faa7
+53080e7ceab4485ce402e4a18a49d2b83d660e0faf57dc1437c67a1b004cc80c99a4e6
+4fab0c3d1e5d83aadb70c70c373dd0eeea4c8fe660a6d7e4f3d40e32efa411bb926b71
+bf3b7a5b27fc5b4ab0ceb96f8ceeb71f6b1b71e10947531e6ab2e2da5348d4787baea9
+55ea6d63235a14d6d65004e93d0652e36452342547bd8d1101750af9de6ad5c4a59538
+cf5da823db0cf6e4b189dfea6562bd1d0406b2b2e58d4d230a91c4f6436d3051e5ad7b
+c01810acc53005ac73485b6ba71dca46303cd5ac4108c9c24b26051933260d097df1d9
+5b4266713cf1a52062c1bf1aa688ec1078ef9ecb54035d9bb8760b2d286b88416a911f
+ce57c934553e0d60632dd9fae5c03f0e05ca55d183629a96b502ed3c2b0622cc54eca8
+ab1acd780651aa1a13ac160a2a8dbb657e7ab79915b0d8a1054e0f523bdd59c000ca05
+00e56650aa86d614b81331a12e0457d83259d6f13b24b539e76b3bb81710007c2cd18b
+0d27c28ecdc466f6bdb40c8b794af910e029a418adeb8398bba248b6e8e7af025ce173
+4140c234768bcb65f9eb12c891c99a197baa1e29a298d222e0ea163ac94e2ce7288baf
+06c2a516c7c1c229807bbe139e76a41f5671ce80791097d0b1a8337a19aa16fbf902cc
+840bcf990c8b0bca71a3926641c756cc016e72685b32c50d1d61adc92d9aeaeb5da8d2
+38bf593440a4b252d71e751f2859956c584c67dbda94524a7cfae5416a18d241c1adae
+0af94946aba5dc02753aa17e2ba3002547e91f709d022543890cd3200472f4145f0d66
+e53ce81a0b4ff6b58a3191bf49d83090ee944aac903aad185d8a6434e05d11b1896cad
+d38a6917f96c13befd66aa6df35b5fe466d992b5ba190c6e9d5fea87dcbae57fac7deb
+af5ffa08d0c200220000b3

Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL	(original)
+++ trunk/orca/INSTALL	Sat Jul 13 18:40:21 2002
@@ -113,25 +113,37 @@
    locally on the machine that Orca will run on, since Orca will only
    read each file every five minutes.
 
-   If you are running percollator on a system running a web server,
-   you can have percollator watch the access_log generated by the web
-   server if a NCSA compatible access log is generated.  In this case,
-   not the location of the access_log for the configure script.
+   If you are running percollator on a system running a web, proxy,
+   or Squid server, you can have percollator watch the logs generated
+   by these programs.  In this case, note the location of the log file
+   for the configure script.
 
 4) Configure Orca.
 
    Now that you have decided where the RRD, HTML, and optionally the
-   percollator data files and the web server access logs are located,
+   percollator data files and the web server access logs, are located,
    run the configure script with the following arguments:
 
    % ./configure --prefix=ORCA_PREFIX_DIRECTORY \
                  --with-rrd-dir=RRD_DIR_LOCATION \
                  --with-html-dir=HTML_DIR_LOCATION \
                  --with-perc-dir=PERCOLLATOR_DIR_LOCATION \
-                 --with-access-log=ACCESS_LOG_LOCATION
+                 --with-TYPE-log=LOG_LOCATION
 
    If you choose nothing else, the --with-html-dir must always be used.
 
+   If you use a web, proxy, or Squid server, you can have percollator
+   gather statistics from the log file.  Use this table to decide which
+   configure option to use:
+
+   Log Type                                    Configure Option
+   -----------------------------------------------------------------
+   NCSA/Common Log Format                      --with-ncsa-log=FILE
+   Common Log Format with Proxy Information    --with-proxy-log=FILE
+   Squid Log Format                            --with-squid-log=FILE
+
+   Configure will let you use only one of these --with-TYPE-log options.
+
    The configure script will find where your version of Perl and some
    other assorted programs are located.
 

Modified: trunk/orca/src/start_percol.sh.in
==============================================================================
--- trunk/orca/src/start_percol.sh.in	(original)
+++ trunk/orca/src/start_percol.sh.in	Sat Jul 13 18:40:21 2002
@@ -10,9 +10,10 @@
 CUT=@CUT@
 EXPR=@EXPR@
 UNAME=@UNAME@
-NCSAHTTPLOG=@NCSAHTTPLOG@
 PERCOLLATOR_DIR=@PERCOLLATOR_DIR@
 SE=@SE@
+WATCH_HTTPD="@WATCH_HTTPD@"
+WEB_LOG=@WEB_LOG@
 
 # Get the hostname without the fully qualified part; that is, trim off
 # anything past the first `.'.
@@ -22,7 +23,7 @@
 OUTDIR=$PERCOLLATOR_DIR/$uname
 
 # Export the environmental variables.
-export NCSAHTTPLOG OUTDIR
+export OUTDIR WEB_LOG
 
 # Check if percollator is already running.
 pids=`/usr/ucb/ps auxww | $AWK '/percollator.se/ && !/awk/ {print $2}'`
@@ -32,7 +33,9 @@
 fi
 
 echo "Writing data into $OUTDIR/"
-echo "Using www access log file $NCSAHTTPLOG"
+if test "$WEB_LOG"; then
+  echo "Using www access log file $WEB_LOG"
+fi
 
 # Cd to / so that any automounted filesystems can be unmounted.
 cd /
@@ -48,12 +51,6 @@
   exit 2
 fi
 
-# Only turn on HTTP recording if NCSAHTTPLOG is set.
-WATCH_HTTPD=
-if test "$NCSAHTTPLOG"; then
-  WATCH_HTTPD=-DWATCH_HTTPD
-fi
-
 # Now start the logging.
 echo "Starting logging"
 $SE $LE_PATCH -DWATCH_OS $WATCH_HTTPD $libdir/percollator.se &

Modified: trunk/orca/src/orca.pl
==============================================================================
--- trunk/orca/src/orca.pl	(original)
+++ trunk/orca/src/orca.pl	Sat Jul 13 18:40:21 2002
@@ -17,7 +17,7 @@
 
 # This is the version of Orca.
 use vars qw($VERSION);
-$VERSION = 0.18;
+$VERSION = 0.19;
 
 # This is the version number used in creating the DS names in RRDs.
 # This should be updated any time a new version of Orca needs some
@@ -102,14 +102,25 @@
   print { $self->{_handle} } <<END;
 $self->{_bottom}
 <p>
-<hr align=left width=225>
-<img width=186 height=45 src="orca.gif">
-<br>
-<font FACE="Arial,Helvetica" SIZE=2>
-  Orca-$::VERSION by
-  <a href="http://www.geocities.com/ResearchTriangle/Thinktank/4996/">Blair Zajac</a>
-  <a href="mailto:bzajac\@geostaff.com">bzajac\@geostaff.com</a>.
-</font>
+<hr align=left width=475>
+<table cellpadding=0 border=0>
+  <tr>
+    <td width=350 valign=center>
+        <img width=186 height=45 src="orca.gif" alt="Orca Home Page">
+      <br>
+      <font FACE="Arial,Helvetica" SIZE=2>
+        Orca-$::VERSION by
+        <a href="http://www.geocities.com/ResearchTriangle/Thinktank/4996/">Blair Zajac</a>
+        <a href="mailto:bzajac\@geostaff.com">bzajac\@geostaff.com</a>.
+      </font>
+    </td>
+    <td width=120 valign=center>
+      <a href="http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool">
+        <img width=120 height=34 src="rrdtool.gif" alt="RRDTool Home Page" border=0>
+      </a>
+    </td>
+  </tr>
+</table>
 </body>
 </html>
 END
@@ -2797,26 +2808,36 @@
     }
   }
 
-  # Create orca.gif in the HTML directory.  Convert the hexadecimal form
+  # Create the necessary GIF files in the HTML directory.  This should
+  # include orga.gif and rrdtool.gif.  Convert the hexadecimal forms
   # stored in the DATA section to the raw GIF form on disk.
-  my $orca_gif = "$config_options->{html_dir}/orca.gif";
-  print "Creating $orca_gif.\n" if $opt_verbose;
-  if (open(ORCA_WRITE, ">$orca_gif")) {
-    # Skip past the text following the __END__ until the code HEX_ORCA_GIF.
-    while (<main::DATA>) {
-      last if /^HEX_ORCA_GIF/;
+  my $gif_filename = '';
+  while (<main::DATA>) {
+    chomp;
+    if ($gif_filename) {
+      if (/CLOSE/) {
+        close(ORCA_WRITE) or
+          warn "$0: error in closing `$gif_filename' for writing: $!\n";
+        $gif_filename = '';
+      }
+      else {
+        chomp;
+        print ORCA_WRITE pack('h*', $_);
+      }
     }
-
-    # Now read in the 
-    while (<main::DATA>) {
-      chomp;
-      print ORCA_WRITE pack('h*', $_);
+    elsif (/OPEN (.*)/) {
+      $gif_filename = "$config_options->{html_dir}/$1";
+      print "Creating $1.\n" if $opt_verbose;
+      unless (open(ORCA_WRITE, ">$gif_filename")) {
+        warn "$0: cannot open `$gif_filename' for writing: $!\n";
+        $gif_filename = '';
+      }
     }
-    close(ORCA_WRITE) or
-      warn "$0: error in closing `$orca_gif' for writing: $!\n";
   }
-  else {
-    warn "$0: cannot open `$orca_gif' for writing: $!\n";
+  if ($gif_filename) {
+    close(ORCA_WRITE) or
+      warn "$0: error in closing `$gif_filename' for writing: $!\n";
+    $gif_filename = '';
   }
 }
 
@@ -3779,7 +3800,9 @@
 
 =cut
 
-HEX_ORCA_GIF
+These are hexadecimal forms of GIFs used by Orca.
+
+OPEN orca.gif
 749464839316ab00d2007fff00ffffff1f0f8f2e1e2f4d1dbe5c2c4e7b3bed8a4a7da9
 490dc858ace7774c0776db16856b35940b44a39a63a22a72b1c991c059000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000
@@ -3845,3 +3868,58 @@
 6ed89cb844b61a2f0941c906257ec46086c5346a34b974ab43269001bd0a010cc31f42
 e4a56e419430cc78311cdffad9c5c6a4c499697b06e4ecbaf1449010a15e004ba1d29a
 ad4f721a0e9965d8404000b3
+CLOSE
+
+OPEN rrdtool.gif
+749464837316870022003f0000000066003399046699e375c864284bf7f73b9a9a9a08
+99ccfbccccffffccffffff7f7f7f7e7e7e000000000000000000c20000000087002200
+0040ef099c94badb83be9b63fbd57c882e866790ac4abe93e292c5032016fd87eafe97
+d44d04b5050342a1f88c4627020663f9fc184b92daa5fa2d0c0201010081cb0b87c4e2
+39d7fb4bad8f302b78965e1fb6eabdbd7cd11b7b777e3ed61727d738a44763909806c3
+905040b077c360984990b390b7738928399043d78784694090e458445a947840c0e890
+70c30b4a5370b9a78386a3d84050e6969a7460e73963b274e430c060d53060304ad505
+a58c250090c5c564ba8920214080e8cafdb8b9d21e2460c080f360cadaa330691421db
+20909e2cdd80f62fd469fc8fe9922109e05579f4dd0c841a10669dc0a1c46bd1851f3e
+5df084504ed20a53a0705436efb2a04d24304645d86491b71ac4080a917bd30c2e93bb
+74a69923203023a0c007f40618c883d351892694854c544ae0c4cd761de55ca844642e
+a7989491aac424af940225071839254ac49e4229cc041410913082362c3506a3e265b9
+130e93d4a06200cc65d6444ddad93dfbb9a06e8d4e4f6a35041f4885528c02e139878a
+c49db86c376872906379900e98a65079bc899ee3e004aa4d15d403bbd1045f4de119c8
+85d5f5d5cf23d426ea4320020a16ade13106efa08617df61b9ad56b525d5b47f5c00e5
+cb2a3b0086ea542ea8d780ee1540c43a6a035cd8c35956d48ef2a23bcdeed4afe0c1da
+afb7d5ed7395f40ad243ec6f0db69b6b9de6647ee547ef7408250b00160ca350af5cac
+b6c0ca617cc09fcf4c51c1401e140895d6895de8319f8114a973f89c534d6181600ec4
+333c907409102c533875519e4b830c71425f0088f00acb17a4121a0212914184c43465
+f73585157d07b5c616c17195c610d55143a919b40248cd0b36e154c597cc09f854154e
+79946d594e513d80900453206f884801a6a6964cf827488d5e5134631b4a5145819b42
+6355861b7639650d8200c240e25a45d314028a412080c1a04e0acbc10f3d1a831c9dc8
+4af356aa9ef454271fdc20a0083c42999dc441ae10c7af9db832e8c8a36200b19e3408
+20a04b27008a4b22a3b6234be2a4b6da15820e80dab04108001b32e137c6dab0ef4b4f
+be2b37561be0dace4fa3a2636c2302c2a54b220c4271a0c584b227242a9c443aba920b
+a545a0c2009811a04d07ca09de670d54005c6ab8ae618be108cc667048b1081bef68a7
+66dae763b00820a4e0cdde7ba61300ba079d0da371635c6f22c6d5e50a9440ab40f11e
+e20bb958bec2231038a448a529e73ef631504bb1ee41b99a3c505a6c27150c2007514a
+0c29327b810c253ba17f508aed2719fecad1f89e1b0002babf6e8cd259c8696b8c4cca
+27dc22dca8aad95fec546523958843ca7bb584c30cfceec99b99a523363c6320b08bdb
+5cdaa2700b07e460c6c85cc8f943a204fae1acc5f400f3b6bf3395a5f2ea696caee07a
+6d8ce56f9600aaeff0763ab51cb1fb034b1e30fc584be6de2f25f2aa88f334d699faa7
+53080e7ceab4485ce402e4a18a49d2b83d660e0faf57dc1437c67a1b004cc80c99a4e6
+4fab0c3d1e5d83aadb70c70c373dd0eeea4c8fe660a6d7e4f3d40e32efa411bb926b71
+bf3b7a5b27fc5b4ab0ceb96f8ceeb71f6b1b71e10947531e6ab2e2da5348d4787baea9
+55ea6d63235a14d6d65004e93d0652e36452342547bd8d1101750af9de6ad5c4a59538
+cf5da823db0cf6e4b189dfea6562bd1d0406b2b2e58d4d230a91c4f6436d3051e5ad7b
+c01810acc53005ac73485b6ba71dca46303cd5ac4108c9c24b26051933260d097df1d9
+5b4266713cf1a52062c1bf1aa688ec1078ef9ecb54035d9bb8760b2d286b88416a911f
+ce57c934553e0d60632dd9fae5c03f0e05ca55d183629a96b502ed3c2b0622cc54eca8
+ab1acd780651aa1a13ac160a2a8dbb657e7ab79915b0d8a1054e0f523bdd59c000ca05
+00e56650aa86d614b81331a12e0457d83259d6f13b24b539e76b3bb81710007c2cd18b
+0d27c28ecdc466f6bdb40c8b794af910e029a418adeb8398bba248b6e8e7af025ce173
+4140c234768bcb65f9eb12c891c99a197baa1e29a298d222e0ea163ac94e2ce7288baf
+06c2a516c7c1c229807bbe139e76a41f5671ce80791097d0b1a8337a19aa16fbf902cc
+840bcf990c8b0bca71a3926641c756cc016e72685b32c50d1d61adc92d9aeaeb5da8d2
+38bf593440a4b252d71e751f2859956c584c67dbda94524a7cfae5416a18d241c1adae
+0af94946aba5dc02753aa17e2ba3002547e91f709d022543890cd3200472f4145f0d66
+e53ce81a0b4ff6b58a3191bf49d83090ee944aac903aad185d8a6434e05d11b1896cad
+d38a6917f96c13befd66aa6df35b5fe466d992b5ba190c6e9d5fea87dcbae57fac7deb
+af5ffa08d0c200220000b3
+CLOSE

Modified: trunk/orca/CHANGES
==============================================================================
--- trunk/orca/CHANGES	(original)
+++ trunk/orca/CHANGES	Sat Jul 13 18:40:21 2002
@@ -1,3 +1,30 @@
+Fri Feb 19 11:55:50 PST 1999
+
+	Version 0.19.
+
+	Fix a bug in copying SE 3.1's percollator.se changes where it
+	was not skipping the HTTP/1.x code in the NCSA style access log.
+	Now percollator.se can handle log files with or without the code.
+
+Thu Feb 18 11:54:03 PST 1999
+
+	percollator.se now logs information on integral multiples of
+	the interval.  This is useful for RRD which expects data to be
+	measured on the interval.
+
+	Add Squid log processing to percollator.se courtesy of Adrian
+	Cockroft of Sun Microsystems.
+
+	Rename the configure --with options.  If you want to watch NCSA
+	style access logs, use --with-ncsa-log.  To watch NCSA style
+	proxy access logs, use --with-proxy-log.  And to watch Squid
+	access log, use --with-squid-log.
+
+Wed Feb 17 17:37:35 PST 1999
+
+	Add rrdtool.gif to the GIF files that Orca creates and include
+	a HREF to rrdtool.gif in every HTML file that Orca generates.
+
 Tue Feb 16 10:49:07 PST 1999
 
 	Version 0.18.




More information about the Orca-checkins mailing list