[Orca-checkins] rev 240 - in trunk/orca: . data_gatherers data_gatherers/procallator

Blair Zajac blair at orcaware.com
Sun Jun 15 12:38:33 PDT 2003


Author: blair
Date: Sun Jun 15 12:38:30 2003
New Revision: 240

Added:
   trunk/orca/data_gatherers/procallator/Makefile.in
      - copied, changed from rev 238, trunk/orca/data_gatherers/orcallator/Makefile.in
   trunk/orca/data_gatherers/procallator/S99procallator.sh.in
      - copied, changed from rev 238, trunk/orca/data_gatherers/procallator/procallator
   trunk/orca/data_gatherers/procallator/procallator.cfg.in
      - copied, changed from rev 238, trunk/orca/data_gatherers/procallator/procallator.cfg
Removed:
   trunk/orca/data_gatherers/procallator/install.sh
   trunk/orca/data_gatherers/procallator/procallator
   trunk/orca/data_gatherers/procallator/procallator.cfg
Modified:
   trunk/orca/INSTALL
   trunk/orca/Makefile.in
   trunk/orca/configure.in
   trunk/orca/data_gatherers/Makefile.in
   trunk/orca/data_gatherers/procallator/README
Log:
Do the first major integration of procallator into the Orca configure
and Makefile system.  This commit doesn't take on fixing or upgrading
the procallator script itself, that'll come next.

* INSTALL
  ([Systems with System Statistics in /proc, i.e. Linux] Install procallator):
    New section for installing procallator on a system.

* Makefile.in:
  (procallator_run_at_boot): New rule to run
    "make procallator_run_at_boot" in data_gatherers/procallator.

* configure.in:
  Search for chkconfig so that procallator can be installed into
    /etc/rc.d/init.d on Linux systems.
  Search for the /proc equivalent directory on the system.
  Add a new configure command line option, --enable-librrdtool, which
    forces RRDtool to be compiled even if Perl already has RRDtool
    installed, and installs librrd.* into Orca's $libdir.
  By default, the configure script will build and install all
    available data gatherers so that a single Orca installation can be
    used for multiple operating systems.  Add three new command line
    options that disable installing particular data gatherers,
    --disable-orcallator, --disable-orca-services and
    --disable-procallator.

* data_gatherers/Makefile.in:
  (procallator_run_at_boot): New rule to run
    "make procallator_run_at_boot" in data_gatherers/procallator.
  Set $(SUBDIRS) to the subdirectories specified by configure.in.

* data_gatherers/procallator/install.sh:
  Removed.  Functionality replaced by Makefile.in.
  
* data_gatherers/procallator/Makefile.in:
  Copied from data_gatherers/orcallator/Makefile.in.
  s/orcallator/procallator/g.
  Use chkconfig to set up the links from
    /etc/rc.d/init.d/S99procallator into /etc/rc.d/rcX.d/.

* data_gatherers/procallator/README:
  Clean up formatting.
  Remove installation section, since it is now provided by configure
    and Makefile.
  Still needs some more work.

* data_gatherers/procallator/S99procallator.sh.in:
  Renamed from procallator.
  Update to look more like standard /etc/rc.d/init.d scripts.
  Do not use hardwired paths to procallator; use paths supplied by
    configure.
  (start):
    Create /var/lock/subsys/procallator and /var/run/procallator.pid.
  (stop)
    Remove /var/lock/subsys/procallator and /var/run/procallator.pid.
    Use killproc() instead of grep to find procallator processes.
  (status):
    New subcommand.
  (restart):
    New subcommand.

* data_gatherers/procallator/procallator.cfg.in:
  Require Orca version 0.265 or greater.
  Replace hardwired paths for base_dir and html_dir with the paths
    specified by configure.
  Turn expire_images on.
  Replace guilherme.chehab at tco.net.br's address for warn_email with
    WARN_EMAIL.  I'm sure he'll appreciate this :)
  Add the generate_*_plot parameters to generate all but the hourly
    plots.
  Use the html_page_header, html_top_title and html_page_footer from
    orcallator.cfg.in.
  Rename the group orcallator to group procallator.
  Remove the reopen option from the group procallator.  This should
    speed up processing of input data files.
  For the Average # Processes in Run Queue plot, increase data_max
    from 100 to 1000 and remove the color for the plots.
  For the Interface Input Bits Per Second and the Interface Output
    Bits Per Second plots, increase data_max to handle Gigabit
    devices.
  Make the TCP Current Connections plot use area instead of a line.
  Move the "Page Ins & Outs rate" and "Swap Ins & Outs rate" into the
    memory section of plots.
  Fix some y_legend names to be consistent, specifically change "rate"
    to "Counts/s", and use consistent capitalization.
  Change colors for some plots.


Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL	(original)
+++ trunk/orca/INSTALL	Sun Jun 15 12:38:30 2003
@@ -29,8 +29,9 @@
     e) Run start_orcallator on all systems.
     f) Edit orcallator.cfg.
 
-11) Run Orca.
+11) [Systems with System Statistics in /proc, i.e. Linux] Install procallator.
 
+12) Run Orca.
 
 
 
@@ -473,7 +474,45 @@
        of date, which may signify a orcallator program that has died
        and is no longer gathering data.
 
-11) Run Orca.
+11) [Systems with System Statistics in /proc, i.e. Linux] Install procallator.
+    a) Install procallator boot and halt time start/stop scripts in
+       /etc/init.d/ and /etc/rc?.d/.
+
+       If you want to have procallator run when the machine boots, you
+       can manually copy data_gatherers/procallator/S99procallator
+       into /etc/init.d/procallator and set up symbolic links from
+       that file to the appropriate K* and S* files in /etc/rc?.d/.
+
+       To make installing this easier, you can run
+
+       % make procallator_run_at_boot
+
+       from either the top of the Orca source tree or from the
+       data_gatherers/procallator directory.  This uses Linux's
+       chkconfig's script to install the start and stop scripts in the
+       approprirate locations.  By default, procallator is started in
+       run levels 2, 3, 4 and 5.
+
+    b) Run start_procallator on all systems.
+
+       Log in as root on all the systems you want to watch and run:
+
+       % /etc/rc.d/init.d/procallator start
+
+       Procallator will not generate an output data file until the
+       first update interval, which will be between 2.5 to 7.5 minutes
+       after procallator is started.
+
+    c) Edit procallator.cfg.
+
+       You need to edit the installed procallator.cfg file and remove
+       all unneeded references.  In particular, you'll want to change
+       warn_email, which is the email address that receives emails
+       when procallator generated files are out of date, which may
+       signify a procallator program that has died and is no longer
+       gathering data.
+
+12) Run Orca.
 
     Log into the system that will run Orca and run the command:
 

Modified: trunk/orca/Makefile.in
==============================================================================
--- trunk/orca/Makefile.in	(original)
+++ trunk/orca/Makefile.in	Sun Jun 15 12:38:30 2003
@@ -53,6 +53,9 @@
 orca_services_run_at_boot:
 	cd data_gatherers/orca_services && $(MAKE) orca_services_run_at_boot
 
+procallator_run_at_boot:
+	cd data_gatherers/procallator && $(MAKE) procallator_run_at_boot
+
 test_modules:
 	cd packages && $(MAKE) CFLAGS="$(CFLAGS)" test_modules
 

Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in	(original)
+++ trunk/orca/configure.in	Sun Jun 15 12:38:30 2003
@@ -200,6 +200,68 @@
 )
 AC_SUBST(WARN_EMAIL)
 
+BUILD_RRD=no
+AC_ARG_ENABLE(librrdtool,
+  AC_HELP_STRING([--enable-librrdtool],
+                 [Build RRD and install librrdtool{.a,.so} into $libdir]),
+  [
+    if test "$enableval" = yes; then
+      BUILD_RRD=yes
+      MAKE_RRDTOOL=make_rrdtool
+      TEST_RRDTOOL=test_rrdtool
+      CLEAN_RRDTOOL=clean_rrdtool
+      DISTCLEAN_RRDTOOL=distclean_rrdtool
+      INSTALL_LIB_RRDTOOL=install_lib_rrdtool
+    fi
+  ]
+)
+AC_SUBST(INSTALL_LIB_RRDTOOL)
+
+BUILD_ORCALLATOR=yes
+ORCALLATOR_SUBDIR=orcallator
+AC_ARG_ENABLE(orcallator,
+  AC_HELP_STRING([--disable-orcallator],
+                 [Do not enable building and installing orcallator]),
+  [
+    if test "$enableval" = no; then
+      BUILD_ORCALLATOR=no
+      ORCALLATOR_SUBDIR=
+    fi
+  ]
+)
+AC_SUBST(BUILD_ORCALLATOR)
+AC_SUBST(ORCALLATOR_SUBDIR)
+
+BUILD_ORCA_SERVICES=yes
+ORCA_SERVICES_SUBDIR=orca_services
+AC_ARG_ENABLE(orca-services,
+  AC_HELP_STRING([--disable-orca-services],
+                 [Do not enable building and installing Orca-Services]),
+  [
+    if test "$enableval" = no; then
+      BUILD_ORCA_SERVICES=no
+      ORCA_SERVICES_SUBDIR=
+    fi
+  ]
+)
+AC_SUBST(BUILD_ORCA_SERVICES)
+AC_SUBST(ORCA_SERVICES_SUBDIR)
+
+BUILD_PROCALLATOR=yes
+PROCALLATOR_SUBDIR=procallator
+AC_ARG_ENABLE(procallator,
+  AC_HELP_STRING([--disable-procallator],
+                 [Do not enable building and installing procallator]),
+  [
+    if test "$enableval" = no; then
+      BUILD_PROCALLATOR=no
+      PROCALLATOR_SUBDIR=
+    fi
+  ]
+)
+AC_SUBST(BUILD_PROCALLATOR)
+AC_SUBST(PROCALLATOR_SUBDIR)
+
 # To get a default CFLAGS for this build, check for a C compiler.  This
 # is also needed to be ready to compile any Perl modules.
 AC_PROG_CC
@@ -208,6 +270,7 @@
 AC_ARG_PROGRAM
 AC_PATH_PROG(BZIP2, bzip2)
 AC_PATH_PROG(BUNZIP2, bunzip2)
+AC_PATH_PROG(CHKCONFIG, chkconfig)
 AC_PATH_PROG(COMPRESS, compress)
 AC_PATH_PROG(CUT, cut, cut)
 AC_PATH_PROG(EXPR, expr, expr)
@@ -276,27 +339,6 @@
 AC_SUBST(COMPRESSOR)
 AC_SUBST(UNCOMPRESSOR_PIPE)
 
-# Always build the orcallator files regardless of the operating system.
-BUILD_ORCALLATOR=yes
-ORCALLATOR_SUBDIR=data_gatherers/orcallator
-INSTALL_LIB_RRDTOOL=
-AC_SUBST(ORCALLATOR_SUBDIR)
-AC_SUBST(INSTALL_LIB_RRDTOOL)
-
-# These commands can be used if the orcallator should not be built.
-# AC_MSG_CHECKING([for solaris host for orcallator install])
-# AC_MSG_RESULT($BUILD_ORCALLATOR)
-# BUILD_ORCALLATOR=no
-# ORCALLATOR_SUBDIR=
-
-# These commands can be used to force a build of the librrdtool library.
-# INSTALL_LIB_RRDTOOL=install_lib_rrdtool
-# MAKE_RRDTOOL=make_rrdtool
-# TEST_RRDTOOL=test_rrdtool
-# INSTALL_PERL_RRDTOOL=
-# CLEAN_RRDTOOL=clean_rrdtool
-# DISTCLEAN_RRDTOOL=distclean_rrdtool
-
 # This command can be used to add --enable-shared to the configure
 # options for RRDtool if it is not already declared.
 # expr "$ORCA_CONFIGURE_COMMAND_LINE" : "--enable-shared" >/dev/null 2>&1 || ORCA_CONFIGURE_COMMAND_LINE="$ORCA_CONFIGURE_COMMAND_LINE --enable-shared"
@@ -394,6 +436,9 @@
 BORP_PERL_MODULE(orca_cv_perl_rrds, $PERL, RRDs, $RRDTOOL_VER)
 test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_rrds=no
 if test "$orca_cv_perl_rrds" = no; then
+  BUILD_RRD=yes
+fi
+if test "$BUILD_RRD" = yes; then
   MAKE_RRDTOOL=make_rrdtool
   TEST_RRDTOOL=test_rrdtool
   INSTALL_PERL_RRDTOOL=install_perl_rrdtool
@@ -447,6 +492,22 @@
 AC_SUBST(INSTALL)
 AC_SUBST(MKDIR)
 
+# Look for the /proc equivalent directory for use by procallator.
+AC_MSG_CHECKING([for /proc style directory])
+PROC_DIR=
+for d in /proc; do
+  if test -d $d; then
+    PROC_DIR="$d"
+    break
+  fi
+done
+if test "$PROC_DIR"; then
+  AC_MSG_RESULT($PROC_DIR)
+else
+  AC_MSG_RESULT(no /proc directory found)
+fi
+AC_SUBST(PROC_DIR)
+
 # Determine the appropriate init.d directory on the system.
 AC_MSG_CHECKING([where the boot init.d directory is])
 for dir in /etc/rc.d/init.d /etc/init.d; do
@@ -478,7 +539,7 @@
 AC_SUBST(RCX_D_CONTAINING_DIR)
 
 # Build the RRDtool library if it is needed.
-if test "$orca_cv_perl_rrds" = no; then
+if test "$BUILD_RRD" = yes; then
   command="(cd packages/$RRDTOOL_DIR; ./configure $RRD_CONFIGURE_COMMAND_LINE)"
   echo ""
   echo "Running configure in packages/$RRDTOOL_DIR to create RRDtool and RRDs.pm."
@@ -494,7 +555,7 @@
 #       variable substitutions.
 #--------------------------------------------------------------------
 if test "$BUILD_ORCALLATOR" = yes; then
-  ORCALLATOR_OUTPUT="data_gatherers/orcallator/Makefile
+  OUTPUT_ORCALLATOR="data_gatherers/orcallator/Makefile
                      data_gatherers/orcallator/orcallator.cfg
                      data_gatherers/orcallator/orcallator_running.pl
                      data_gatherers/orcallator/restart_orcallator.sh
@@ -503,6 +564,24 @@
                      data_gatherers/orcallator/S99orcallator.sh"
 fi
 
+if test "$BUILD_ORCA_SERVICES" = yes; then
+  OUTPUT_ORCA_SERVICES="data_gatherers/orca_services/Makefile
+                        data_gatherers/orca_services/orca_services.cfg
+                        data_gatherers/orca_services/orca_services.pl
+                        data_gatherers/orca_services/orca_services_running.pl
+                        data_gatherers/orca_services/restart_orca_services.sh
+                        data_gatherers/orca_services/start_orca_services.sh
+                        data_gatherers/orca_services/stop_orca_services.sh
+                        data_gatherers/orca_services/S99orca_services.sh"
+fi
+
+if test "$BUILD_PROCALLATOR" = yes; then
+  OUTPUT_PROCALLATOR="data_gatherers/procallator/Makefile
+                      data_gatherers/procallator/procallator.cfg
+                      data_gatherers/procallator/procallator.pl
+                      data_gatherers/procallator/S99procallator.sh"
+fi
+
 AC_OUTPUT(Makefile
           config/PerlHead1
           config/PerlHead2
@@ -510,15 +589,9 @@
           contrib/rotate_orca_graphs/Makefile
           contrib/rotate_orca_graphs/rotate_orca_graphs.sh
           data_gatherers/Makefile
-          $ORCALLATOR_OUTPUT
-          data_gatherers/orca_services/Makefile
-          data_gatherers/orca_services/orca_services.cfg
-          data_gatherers/orca_services/orca_services.pl
-          data_gatherers/orca_services/orca_services_running.pl
-          data_gatherers/orca_services/restart_orca_services.sh
-          data_gatherers/orca_services/start_orca_services.sh
-          data_gatherers/orca_services/stop_orca_services.sh
-          data_gatherers/orca_services/S99orca_services.sh
+          $OUTPUT_ORCALLATOR
+          $OUTPUT_ORCA_SERVICES
+          $OUTPUT_PROCALLATOR
           docs/Makefile
           lib/Makefile
           packages/Makefile
@@ -546,12 +619,6 @@
 echo "Blair Zajac <blair at orcaware.com>"
 echo "----------------------------------------------------------------"
 
-case "$target" in
-  *-solaris*)
-    if test -z "$WEB_LOG"; then
-      AC_MSG_WARN([*** Unless you use a --with-*-log option orcallator will not gather WWW log data.])
-    fi
-    ;;
-  *)
-    ;;
-esac
+if test -z "$WEB_LOG"; then
+  AC_MSG_WARN([*** Unless you use a --with-*-log option orcallator will not gather WWW log data.])
+fi

Modified: trunk/orca/data_gatherers/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/Makefile.in	(original)
+++ trunk/orca/data_gatherers/Makefile.in	Sun Jun 15 12:38:30 2003
@@ -1,7 +1,12 @@
 @SET_MAKE@
 
-SUBDIRS               = orcallator \
-                        orca_services
+ORCALLATOR_SUBDIR     = @ORCALLATOR_SUBDIR@
+ORCA_SERVICES_SUBDIR  = @ORCA_SERVICES_SUBDIR@
+PROCALLATOR_SUBDIR    = @PROCALLATOR_SUBDIR@
+
+SUBDIRS               = $(ORCALLATOR_SUBDIR) \
+                        $(ORCA_SERVICES_SUBDIR) \
+                        $(PROCALLATOR_SUBDIR)
 
 all:	Makefile $(TARGETS)
 	@for dir in $(SUBDIRS); do \
@@ -15,6 +20,9 @@
 orca_services_run_at_boot:
 	cd orca_services && $(MAKE) orca_services_run_at_boot
 
+procallator_run_at_boot:
+	cd procallator && $(MAKE) procallator_run_at_boot
+
 install:
 	@for dir in $(SUBDIRS); do \
 	  echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) install"; \

Copied: trunk/orca/data_gatherers/procallator/Makefile.in (from rev 238, trunk/orca/data_gatherers/orcallator/Makefile.in)
==============================================================================
--- trunk/orca/data_gatherers/orcallator/Makefile.in	(original)
+++ trunk/orca/data_gatherers/procallator/Makefile.in	Sun Jun 15 12:38:30 2003
@@ -13,22 +13,20 @@
 RRD_DIR               = @RRD_DIR@
 INIT_D_DIR            = @INIT_D_DIR@
 RCX_D_CONTAINING_DIR  = @RCX_D_CONTAINING_DIR@
-RAW_ORCALLATOR_DIR    = $(VAR_DIR)/orcallator
-RRD_ORCALLATOR_DIR    = $(RRD_DIR)/orcallator
+RAW_PROCALLATOR_DIR   = $(VAR_DIR)/procallator
+RRD_PROCALLATOR_DIR   = $(RRD_DIR)/procallator
+CHKCONFIG             = @CHKCONFIG@
 
-BIN_PERL_SCRIPTS      = orcallator_column \
-                        orcallator_running
+BIN_PERL_SCRIPTS      = procallator
 LIBEXEC_PERL_SCRIPTS  =
 NOINST_PERL_SCRIPTS   =
 PERL_SCRIPTS          = $(BIN_PERL_SCRIPTS) \
                         $(LIBEXEC_PERL_SCRIPTS) \
                         $(NOINST_PERL_SCRIPTS)
 
-BIN_SHELL_SCRIPTS     = restart_orcallator \
-                        stop_orcallator \
-                        start_orcallator
+BIN_SHELL_SCRIPTS     =
 LIBEXEC_SHELL_SCRIPTS =
-NOINST_SHELL_SCRIPTS  = S99orcallator
+NOINST_SHELL_SCRIPTS  = S99procallator
 SHELL_SCRIPTS         = $(BIN_SHELL_SCRIPTS) \
                         $(LIBEXEC_SHELL_SCRIPTS) \
                         $(NOINST_SHELL_SCRIPTS)
@@ -40,47 +38,36 @@
 LIBEXEC_TARGETS       = $(LIBEXEC_PERL_SCRIPTS) \
                         $(LIBEXEC_SHELL_SCRIPTS)
 
-all: Makefile $(TARGETS) orcallator.cfg
+all: Makefile $(TARGETS) procallator.cfg
 
 install: all
 	$(MKDIR) $(bindir)
-	$(MKDIR) $(libdir)
-	$(MKDIR) $(sysconfdir)
-	$(MKDIR) $(RAW_ORCALLATOR_DIR)
-	$(MKDIR) $(RRD_ORCALLATOR_DIR)
+	$(MKDIR) $(RAW_PROCALLATOR_DIR)
+	$(MKDIR) $(RRD_PROCALLATOR_DIR)
 	@for file in $(BIN_TARGETS); do \
 	  echo $(INSTALL) $$file $(bindir); \
 	  $(INSTALL) $$file $(bindir); \
 	done
-	$(INSTALL) -m 0644 orcallator.se $(libdir)
-	@if test -r $(sysconfdir)/orcallator.cfg; then \
+	@if test -r $(sysconfdir)/procallator.cfg; then \
 	  date="`date +%Y-%m-%d-%H:%M:%S`"; \
-	  echo $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date; \
-	  $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date; \
+	  echo $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date; \
+	  $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date; \
 	else \
-	  echo $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir); \
-	  $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir); \
+	  echo $(INSTALL) -m 0644 procallator.cfg $(sysconfdir); \
+	  $(INSTALL) -m 0644 procallator.cfg $(sysconfdir); \
 	fi
 
-orcallator_run_at_boot: all
+procallator_run_at_boot: all
 	test "$(INIT_D_DIR)"
-	test "$(RCX_D_CONTAINING_DIR)"
-	-$(RM) $(INIT_D_DIR)/orcallator
-	-$(RM) $(RCX_D_CONTAINING_DIR)/rc0.d/K01orcallator
-	-$(RM) $(RCX_D_CONTAINING_DIR)/rc1.d/K01orcallator
-	-$(RM) $(RCX_D_CONTAINING_DIR)/rc2.d/K01orcallator
-	-$(RM) $(RCX_D_CONTAINING_DIR)/rc3.d/S99orcallator
-	$(INSTALL) -m 0744 S99orcallator $(INIT_D_DIR)/orcallator
-	ln -s $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc0.d/K01orcallator
-	ln -s $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc1.d/K01orcallator
-	ln -s $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc2.d/K01orcallator
-	ln -s $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc3.d/S99orcallator
+	-$(RM) $(INIT_D_DIR)/procallator
+	$(INSTALL) -m 0744 S99procallator $(INIT_D_DIR)/procallator
+	$(CHKCONFIG) --add procallator
 
 clean:
 	$(RM) $(TARGETS)
 
 distclean: clean
-	$(RM) *.sh orcallator.cfg orcallator_running.pl Makefile
+	$(RM) *.sh procallator.pl Makefile
 
 .SUFFIXES: .pl .sh
 
@@ -93,22 +80,13 @@
 	chmod 0755 $@
 
 Makefile: Makefile.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/Makefile ./config.status
+	cd ../.. && CONFIG_FILES=data_gatherers/procallator/Makefile ./config.status
 
-orcallator.cfg: orcallator.cfg.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/orcallator.cfg ./config.status
+procallator.cfg: procallator.cfg.in
+	cd ../.. && CONFIG_FILES=data_gatherers/procallator/procallator.cfg ./config.status
 
-orcallator_running.pl: orcallator_running.pl.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/orcallator_running.pl ./config.status
+procallator.pl: procallator.pl.in
+	cd ../.. && CONFIG_FILES=data_gatherers/procallator/procallator.pl ./config.status
 
-restart_orcallator.sh: restart_orcallator.sh.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/restart_orcallator.sh ./config.status
-
-start_orcallator.sh: start_orcallator.sh.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/start_orcallator.sh ./config.status
-
-stop_orcallator.sh: stop_orcallator.sh.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/stop_orcallator.sh ./config.status
-
-S99orcallator.sh: S99orcallator.sh.in
-	cd ../.. && CONFIG_FILES=data_gatherers/orcallator/S99orcallator.sh ./config.status
+S99procallator.sh: S99procallator.sh.in
+	cd ../.. && CONFIG_FILES=data_gatherers/procallator/S99procallator.sh ./config.status

Modified: trunk/orca/data_gatherers/procallator/README
==============================================================================
--- trunk/orca/data_gatherers/procallator/README	(original)
+++ trunk/orca/data_gatherers/procallator/README	Sun Jun 15 12:38:30 2003
@@ -1,23 +1,21 @@
-Linux ORCA-aware statistics colector
+Linux Orca-aware statistics collector.
 
-This piece of software is for use with Orca, by Blair Zajac - http://www.gps.caltech.edu/~blair/orca/ - and intends
-to provide relevant system statistics in a friendly and graphical interface.
+This piece of software is for use with Orca, by Blair Zajac
+    http://www.orcaware.com/orca/
+and intends to provide relevant system statistics in a friendly and
+graphical interface.
 
-	Requirements:
-		- A running Orca server.
-		- perl 5 installad on target linux systems
-		- a mecanism for remote distribution of software to send collected stats from de target to the server.
-                	I use rsync, but anything, ranging from ftp to NFS will do fine.
-			Check the updat_orca_server.sh script (I use it in crontab) for reference on doing it
+    Requirements:
+        - A running Orca server.
+        - Perl 5 installed on target Linux systems.
+        - a mechanism for remote distribution of software to send
+          collected stats from the target to the server.
 
-	Installation:	
-		The installation is quite simple.
-		- Edit script procallator.pl and adjust the configurable parameters on the beginning of this file
-		- Edit install.sh script and check it
-		- as root run install.sh
-		- configure the distribution mecanism
-		- on the server, run orca using the exmple procallator.cfg
+          I use rsync, but anything, ranging from ftp to NFS will do fine.
 
-This software is in alpha stage, use at your own risk.
+          Check the update_orca_server.sh script (I use it in
+          crontab) for reference on doing it.
+
+This software is in alpha stage, so use at your own risk.
 Any comments to Guilherme Chehab <gchehab at abordo.com.br>
 Copyright (C) 2001 Guilherme Carvalho Chehab.  All Rights Reserved

Copied: trunk/orca/data_gatherers/procallator/S99procallator.sh.in (from rev 238, trunk/orca/data_gatherers/procallator/procallator)
==============================================================================
--- trunk/orca/data_gatherers/procallator/procallator	(original)
+++ trunk/orca/data_gatherers/procallator/S99procallator.sh.in	Sun Jun 15 12:38:30 2003
@@ -1,31 +1,77 @@
 #!/bin/sh
 #
-# procallator	Script to load procallator at time.
+# Startup script for the procallator data measurement tool
 #
-# Author	Guilherme Carvalho Chehab <gchehab at abordo.com.br>
+# chkconfig: 2345 99 01
 #
+# description: Procallator is a data measurement tool that measures
+#              many system statistics.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+procallator=$bindir/procallator
+
+RETVAL=0
 
 # Source function library.
 . /etc/init.d/functions
 
+start ()
+{
+    echo -n $"Starting procallator: "
+    if [ -x $procallator ]; then
+        $procallator &
+        RETVAL=$?
+        PID=$!
+        if test $RETVAL -eq 0; then
+            success $"procallator startup"
+            touch /var/lock/subsys/procallator
+            echo $PID > /var/run/procallator.pid
+        else
+            failure $"procallator startup"
+        fi
+        echo
+    else
+        failure "$0: $procallator does not exist or is not executable."
+    fi
+}
+
+stop ()
+{
+    echo -n $"Stopping procallator: "
+    killproc $procallator
+    RETVAL=$?
+    echo
+    if test $RETVAL -eq 0; then
+        rm -f /var/lock/subsys/procallator /var/run/procallator.pid
+    fi
+}
+
 # See how we were called.
 case "$1" in
-  start)
-	if [ -f /usr/local/bin/procallator.pl ]; then
-	   action  "Initializing procalator statistics colector " /usr/local/bin/procallator.pl &
-	fi
-
-	;;
-  stop)
-	action "Stoping procallator" kill `ps -ef | grep procallat | grep -v grep | tr -s " " | cut -f 2 -d " "`
-	
-	;;
-  *)
-	# do not advertise unreasonable commands that there is no reason
-	# to use with this device
-	echo "Usage: procallator {start|stop}"
-	exit 1
-esac
 
-exit 0
+start)
+    start
+    ;;
 
+stop)
+    stop
+    ;;
+
+status)
+    status procallator
+    ;;
+
+restart)
+    stop
+    start
+    ;;
+
+*)
+    echo "Usage: $0 {start|stop|restart|status}"
+    exit 1
+    ;;
+
+esac
+exit $RETVAL

Copied: trunk/orca/data_gatherers/procallator/procallator.cfg.in (from rev 238, trunk/orca/data_gatherers/procallator/procallator.cfg)
==============================================================================
--- trunk/orca/data_gatherers/procallator/procallator.cfg	(original)
+++ trunk/orca/data_gatherers/procallator/procallator.cfg.in	Sun Jun 15 12:38:30 2003
@@ -1,27 +1,34 @@
 # Orca configuration file for procallator files.
 
+# Require at least this version of Orca.
+require			Orca 0.265
+
 # base_dir is prepended to the paths find_files, html_dir, rrd_dir,
 # and state_file only if the path does not match the regular
 # expression ^\\?\.{0,2}/, which matches /, ./, ../, and \./.
-base_dir		/usr/local/var/orca/rrd/procallator
+base_dir		@RRD_DIR@/procallator
 
-# rrd_dir specifies the location of the generated RRD data files.
+# rrd_dir specifies the location of the generated RRD data files.  If
+# rrd_dir is a relative path, then it is made relative to base_dir if
+# base_dir is set.
 rrd_dir			.
 
 # state_file specifies the location of the state file that remembers
-# the modification time of each source data file.
+# the modification time of each source data file.  If state_file is a
+# relative path, then it is made relative to base_dir is base_dir is
+# set.
 state_file		orca.state
 
 # html_dir specifies the top of the HTML tree created by Orca.
-html_dir		/usr/local/www/ramdrive/servers2
+html_dir		@HTML_DIR@/procallator
 
 # By default create .meta tag files for all PNGs or GIFs so that the
 # web browser will automatically reload them.
-expire_images		0
+expire_images		1
 
 # Find files at the following times:
-#    0:10 to pick up new orcallator files for the new day.
-#    1:00 to pick up late comer orcallator files for the new day.
+#    0:10 to pick up new procallator files for the new day.
+#    1:00 to pick up late comer procallator files for the new day.
 #    6:00 to pick up new files before the working day.
 #   12:00 to pick up new files during the working day.
 #   19:00 to pick up new files after the working day.
@@ -31,8 +38,33 @@
 # being updated constantly stops being updated.  For mathematical
 # expressions use the word `interval' to get the interval number for
 # the data source.
-warn_email		guilherme.chehab at tco.net.br
-late_interval		interval + 30 
+warn_email		@WARN_EMAIL@
+late_interval		interval + 30
+
+# These parameters specify which plots to generate.
+generate_hourly_plot	0
+generate_daily_plot	1
+generate_weekly_plot	1
+generate_monthly_plot	1
+generate_quarterly_plot	1
+generate_yearly_plot	1
+
+# This sets the HTML markup that is placed at the very top of every
+# web page and is primarily used to display the site's logo.
+html_page_header	<h3>Put your site's logo here.</h3>
+
+# This sets the text, that should not be HTML markup, that is used
+# only in the main index.html file.  It is used in the <title></title>
+# element and also placed in the HTML body after the html_page_header
+# in a <h1></h1> element index.html file.
+html_top_title		Orca Host Status
+
+# This sets the HTML markup that is placed at the bottom of every web
+# page.
+html_page_footer
+  <font face="verdana,geneva,arial,helvetica">
+    These plots brought to you by your local system administrator.
+  </font>
 
 # This defines where the find the source data files and the format of
 # those files.  Notes about the fields:
@@ -45,16 +77,15 @@
 #   generate a subgroup name, hence all the (?:...) for matching
 #   anything else.
 # interval
-#   The interval here must match the interval used by orcallator to
+#   The interval here must match the interval used by procallator to
 #   record data.  Do not change this, as it has an effect on the
 #   generated RRD data files.
 
-group orcallator {
-find_files		/usr/local/var/orca/procallator/(.*)/(?:(?:procallator)|(?:proccol))-\d{4}-\d{2}-\d{2}(?:\.(?:Z|gz|bz2))?
+group procallator {
+find_files		@VAR_DIR@/procallator/(.*)/(?:(?:procallator)|(?:proccol))-\d{4}-\d{2}-\d{2}(?:-\d{3,})?(?:\.(?:Z|gz|bz2))?
 column_description	first_line
 date_source		column_name timestamp
 interval		300
-reopen			1
 filename_compare	sub {
 			  my ($ay, $am, $ad) = $a =~ /-(\d{4})-(\d\d)-(\d\d)/;
 			  my ($by, $bm, $bd) = $b =~ /-(\d{4})-(\d\d)-(\d\d)/;
@@ -67,30 +98,9 @@
 			}
 }
 
-# This sets the HTML markup that is placed at the very top of every
-# web page and is primarily used to display the site's logo.
-html_page_header
-  <spacer type=vertical size=4>
-  <body bgcolor="#808080">
-
-# This sets the text, that should not be HTML markup, that is used
-# only in the main index.html file.  It is used in the <title></title>
-# element and also placed in the HTML body after the html_page_header
-# in a <h1></h1> element index.html file.
-html_top_title		Estado dos servidores TCO/NBT 
-
-# This sets the HTML markup that is placed at the bottom of every web
-# page.
-html_page_footer
-  <spacer type=vertical size=20>
-  <font face="Arial,Helvetica">
-     Estes gr&aacute;ficos foram gerados Blair Zajac´s ORCA, and Guilherme Chehab´s Procallator
-  </font>
-  </html>
-
 plot {
 title			%g Uptime
-source			orcallator
+source			procallator
 data			uptime / 86400
 data			uptime / ( 86400 * 7 )
 data			uptime / ( 86400 * 30 )
@@ -105,16 +115,12 @@
 }
 
 plot {
-title			%g Average # Processes in Run Queue (Load Average) & number pf CPUs
-source			orcallator
+title			%g Average # Processes in Run Queue (Load Average)
+source			procallator
 data			1runq
-data			5runq 
+data			5runq
 data			15runq
-data			ncpus	
-color			00ff00
-color			0000ff
-color			ff00ff
-color			ff0000
+data			ncpus
 line_type		LINE1
 line_type		LINE1
 line_type		LINE1
@@ -122,16 +128,16 @@
 legend			1 minute average
 legend			5 minute average
 legend			15 minute average
-legend			CPUs (load threshold)
-y_legend		Number of processes and CPUs
+legend			Number CPUs
+y_legend		Number Processes
 data_min		0
-data_max		100
+data_max		1000
 href			http://www.orcaware.com/orca/docs/orcallator.html#processes_in_run_queue
 }
 
 plot {
 title			%g CPU Usage
-source			orcallator
+source			procallator
 data			usr%
 data			sys%
 data			nice%
@@ -142,7 +148,7 @@
 line_type		stack
 legend			User
 legend			System
-legend			nice
+legend			Nice
 legend			Idle
 y_legend		Percent
 data_min		0
@@ -151,15 +157,15 @@
 plot_max		100
 rigid_min_max		1
 color			00ff00
-color			0000ff
 color			ff0000
+color			0000ff
 color			ffffd0
 href			http://www.orcaware.com/orca/docs/orcallator.html#cpu_usage
 }
 
 plot {
 title			%g New Process Spawn Rate
-source			orcallator
+source			procallator
 data			#proc/s
 line_type		area
 line_type		line1
@@ -171,8 +177,8 @@
 }
 
 plot {
-title			%g Number of System & running Processes on cpu
-source			orcallator
+title			%g Number of System & Running Processes
+source			procallator
 data			#proc
 data			#proc_oncpu
 line_type		line1
@@ -189,7 +195,7 @@
 
 plot {
 title			%g Web Server Hit Rate
-source			orcallator
+source			procallator
 data			httpop/s
 data			http/p5s
 line_type		area
@@ -205,7 +211,7 @@
 
 plot {
 title			%g Web Server File Size
-source			orcallator
+source			procallator
 data			%to1KB
 data			%to10KB
 data			%to100KB
@@ -232,7 +238,7 @@
 
 plot {
 title			%g Web Server Data Transfer Rate
-source			orcallator
+source			procallator
 data			httpb/s
 line_type		area
 legend			Bytes/s
@@ -243,7 +249,7 @@
 
 plot {
 title			%g Web Server HTTP Error Rate
-source			orcallator
+source			procallator
 data			htErr/s
 line_type		area
 legend			HTTP errors/s
@@ -253,65 +259,43 @@
 }
 
 plot {
-title			%g Page ins & outs rate
-source			orcallator
-data			pages_in
-data			pages_out
-legend			pages in/s
-legend			pages out/s
-y_legend		Pages/s
-data_min		0
-}
-
-plot {
-title			%g Swap ins & outs rate
-source			orcallator
-data			swap_in
-data			swap_out
-legend			Swap in/s
-legend			Swap out/s
-y_legend		Pages/s
-data_min		0
-}
-
-plot {
-title			%g Context switches & Interrupts rate
-source			orcallator
+title			%g Context Switches & Interrupts Rate
+source			procallator
 data			ctxt/s
-data			intr/s 
+data			intr/s
 legend			Context switches
 legend			Interrupts
-y_legend		rate/s
+y_legend		Counts/s
 data_min		0
 }
 
 plot {
 title			%g Interface Input Bits Per Second
-source			orcallator
-data			8 * if_in_b_(.*) 
+source			procallator
+data			8 * if_in_b_(.*)
 line_type		line1
 legend			$1
 y_legend		Bits/s
 data_min		0
-data_max		100000000
+data_max		1000000000
 href			http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second
 }
 
 plot {
-title			%g Interface Ouput Bits Per Second
-source			orcallator
+title			%g Interface Output Bits Per Second
+source			procallator
 data			8 * if_out_b_(.*)
 line_type		line1
 legend			$1
 y_legend		Bits/s
 data_min		0
-data_max		100000000
+data_max		1000000000
 href			http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second
 }
 
 plot {
 title			%g Interface Input Packets Per Second
-source			orcallator
+source			procallator
 data			if_in_p_(.*)
 line_type		line1
 legend			$1
@@ -324,8 +308,8 @@
 
 plot {
 title			%g Interface Output Packets Per Second
-source			orcallator
-data			if_out_p_(.*) 
+source			procallator
+data			if_out_p_(.*)
 line_type		line1
 legend			$1
 y_legend		Packets/s
@@ -337,7 +321,7 @@
 
 plot {
 title			%g Interface Input Errors Per Second
-source			orcallator
+source			procallator
 data			if_in_e_(.*)
 line_type		line1
 legend			$1
@@ -349,7 +333,7 @@
 
 plot {
 title			%g Interface Output Errors Per Second
-source			orcallator
+source			procallator
 data			if_out_e_(.*)
 line_type		line1
 legend			$1
@@ -361,7 +345,7 @@
 
 plot {
 title			%g Interface Input Dropped Per Second
-source			orcallator
+source			procallator
 data			if_in_d_(.*)
 line_type		line1
 legend			$1
@@ -373,7 +357,7 @@
 
 plot {
 title			%g Interface Output Dropped Per Second
-source			orcallator
+source			procallator
 data			if_out_d_(.*)
 line_type		line1
 legend			$1
@@ -385,7 +369,7 @@
 
 plot {
 title			%g Interface Output Collisions
-source			orcallator
+source			procallator
 data			if_out_cl_(.*)
 line_type		area
 legend			$1
@@ -398,7 +382,7 @@
 
 plot {
 title			%g Interface Output Carrier Losses
-source			orcallator
+source			procallator
 data			if_out_ca_(.*)
 line_type		area
 legend			$1
@@ -410,62 +394,63 @@
 }
 
 plot {
-title			%g TCP Current connections
-source			orcallator
+title			%g TCP Current Connections
+source			procallator
 data			gTcp_(.*)
+line_type		area
 legend			Connections
-y_legend		Connections
+y_legend		Number Open TCP Connections
 data_min		0
 flush_regexps		1
 }
 
 plot {
-title			%g IP statistics
-source			orcallator
+title			%g IP Statistics
+source			procallator
 data			Ip_(.*)
 legend			$1 rate
-y_legend		rate
+y_legend		Counts/s
 data_min		0
 flush_regexps		1
 }
 
 plot {
-title			%g TCP statistics
-source			orcallator
+title			%g TCP Statistics
+source			procallator
 data			Tcp_(.*)
 legend			$1 rate
-y_legend		rate
+y_legend		Counts/s
 data_min		0
 flush_regexps		1
 }
 
 plot {
-title			%g ICMP statistics
-source			orcallator
+title			%g ICMP Statistics
+source			procallator
 data			Icmp_(.*)
 legend			$1 rate
-y_legend		rate
+y_legend		Counts/s
 data_min		0
 flush_regexps		1
 }
 
 plot {
-title			%g UDP statistics
-source			orcallator
+title			%g UDP Statistics
+source			procallator
 data			Udp_(.*)
 legend			$1 rate
-y_legend		rate
+y_legend		Counts/s
 data_min		0
 flush_regexps		1
 }
 
 plot {
 title			%g NFS Server Statistics
-source			orcallator
+source			procallator
 data			nfs_s_(.*)
 line_type		line1
 legend			$1/s
-y_legend		rate
+y_legend		Counts/s
 data_min		0
 flush_regexps		1
 href			http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_rate
@@ -473,11 +458,11 @@
 
 plot {
 title			%g NFS Client Statistics
-source			orcallator
+source			procallator
 data			nfs_c_(.*)
 line_type		line1
 legend			$1/s
-y_legend		rate
+y_legend		Counts/s
 data_min		0
 flush_regexps		1
 href			http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_rate
@@ -485,7 +470,7 @@
 
 plot {
 title			%g Disk System Wide Reads/Writes Per Second
-source			orcallator
+source			procallator
 data			disk_rd/s
 data			disk_wr/s
 line_type		area
@@ -500,7 +485,7 @@
 
 plot {
 title			%g Disk System Wide Transfer Rate
-source			orcallator
+source			procallator
 data			disk_rB/s
 data			disk_wB/s
 line_type		area
@@ -515,7 +500,7 @@
 
 plot {
 title			%g Disk Reads/Writes Per Second
-source			orcallator
+source			procallator
 data			disk_rd_(.*)/s
 data			disk_wr_(.*)/s
 line_type		area
@@ -530,7 +515,7 @@
 
 plot {
 title			%g Disk Transfer Rate
-source			orcallator
+source			procallator
 data			disk_rB_(.*)/s
 data			disk_wB_(.*)/s
 line_type		area
@@ -545,7 +530,7 @@
 
 plot {
 title			%g Disk Space Percent Usage
-source			orcallator
+source			procallator
 data			mnt_(.*)
 line_type		line1
 legend			$1
@@ -558,8 +543,8 @@
 }
 
 plot {
-title			%g Physical Memory usage percent 
-source			orcallator
+title			%g Physical Memory Usage
+source			procallator
 data			mem_used%
 data			mem_free%
 data			mem_shrd%
@@ -572,24 +557,24 @@
 line_type		stack
 legend			Used memory
 legend			Free memory
-legend			shared memory
-legend			buffer memory
-legend			cached memory
-y_legend		percent
+legend			Shared memory
+legend			Buffer memory
+legend			Cached memory
+y_legend		Percent
 data_min		0
 data_max		100
 href			http://www.orcaware.com/orca/docs/orcallator.html#memory_free
 }
 
 plot {
-title			%g Swap usage percent
-source			orcallator
+title			%g Swap Usage
+source			procallator
 data			swp_used%
 data			swp_free%
 line_type		area
 line_type		stack
-legend			Used swap
-legend			Free swap
+legend			Swap Used
+legend			Swap Free
 y_legend		percent
 data_min		0
 data_max		100
@@ -597,8 +582,30 @@
 }
 
 plot {
+title			%g Page Ins & Outs Rate
+source			procallator
+data			pages_in
+data			pages_out
+legend			Pages in/s
+legend			Pages out/s
+y_legend		Pages/s
+data_min		0
+}
+
+plot {
+title			%g Swap Ins & Outs Rate
+source			procallator
+data			swap_in
+data			swap_out
+legend			Swap in/s
+legend			Swap out/s
+y_legend		Pages/s
+data_min		0
+}
+
+plot {
 title			%g Memory Page Scan Rate
-source			orcallator
+source			procallator
 data			scanrate
 line_type		area
 legend			Page scan rate
@@ -609,7 +616,7 @@
 
 plot {
 title			%g Memory Page Residence Time
-source			orcallator
+source			procallator
 data			page_rstim
 line_type		area
 legend			Page residence time
@@ -620,7 +627,7 @@
 
 plot {
 title			%g Memory Available Swap Space
-source			orcallator
+source			procallator
 data			1024 * swap_avail
 line_type		area
 legend			Available swap space
@@ -632,7 +639,7 @@
 
 plot {
 title			%g Memory Page Usage
-source			orcallator
+source			procallator
 data			pp_kernel
 data			free_pages
 data			pagestotl - pp_kernel - free_pages
@@ -656,7 +663,7 @@
 
 plot {
 title			%g Memory Pages Locked & IO
-source			orcallator
+source			procallator
 data			pageslock
 data			pagesio
 line_type		area



More information about the Orca-checkins mailing list