[Orca-checkins] rev 158 - trunk/orca/contrib/orca_services
blair at orcaware.com
blair at orcaware.com
Sat Nov 9 20:44:00 PST 2002
Author: blair
Date: 2002-11-09 20:42:09 -0800 (Sat, 09 Nov 2002)
New Revision: 158
Modified:
trunk/orca/contrib/orca_services/README
trunk/orca/contrib/orca_services/S99orca_services.sh.in
trunk/orca/contrib/orca_services/orca_services.cfg.in
trunk/orca/contrib/orca_services/orca_services.pl.in
trunk/orca/contrib/orca_services/orca_services_running.pl.in
trunk/orca/contrib/orca_services/restart_orca_services.sh.in
trunk/orca/contrib/orca_services/start_orca_services.sh.in
trunk/orca/contrib/orca_services/stop_orca_services.sh.in
Log:
Finish orcaservices to orca_services renames and do other renames and
cleanup.
* README:
s/Orca_Services/Orca_services/.
* contrib/orca_services/S99orca_services.sh.in:
s/orcaservices/orca_services/.
* contrib/orca_services/orca_services.cfg.in:
Replace hardcoded find_files setting from /var/orca/orca_services
to @VAR_DIR@/orca_services.
Copy the group {} comment from orcallator.cfg.in.
* contrib/orca_services/orca_services.pl.in:
Replace hardcoded /var/orca/orca_services to @VAR_DIR@/orca_services.
Replace hardcoded /usr/local/bin/gzip -9 with @COMPRESSOR at .
s/Orca_Services/Orca_services/.
s/orcaservices/orca_services/.
* contrib/orca_services/orca_services_running.pl.in:
Replace @ORCASERVICES_DIR@ with @VAR_DIR@/orca_services.
s/orcaservices/orca_services/.
* contrib/orca_services/restart_orca_services.sh.in:
s/orcaservices/orca_services/.
* contrib/orca_services/start_orca_services.sh.in:
Replace @ORCALLATOR_DIR@/../orcaservices with @VAR_DIR@/orca_services.
s/orcaservices/orca_services/.
* contrib/orca_services/stop_orca_services.sh.in:
s/orcallator/orca_services/.
s/orcaservices/orca_services/.
Modified: trunk/orca/contrib/orca_services/start_orca_services.sh.in
==============================================================================
--- trunk/orca/contrib/orca_services/start_orca_services.sh.in (original)
+++ trunk/orca/contrib/orca_services/start_orca_services.sh.in 2002-11-09 20:43:06.000000000 -0800
@@ -1,6 +1,7 @@
#!/bin/sh
-# This script runs orcaservices.pl with the proper options for your site.
+# This script runs orca_services.pl with the proper options for your
+# site.
# Define program locations that will be needed.
prefix=@prefix@
@@ -9,22 +10,22 @@
AWK=@AWK@
CUT=@CUT@
UNAME=@UNAME@
-ORCASERVICES_DIR=@ORCALLATOR_DIR@/../orcaservices
+ORCA_SERVICES_DIR=@VAR_DIR@/orca_services
# Get the hostname without the fully qualified part; that is, trim off
# anything past the first `.'.
uname=`$UNAME -n | $CUT -d. -f1`
-# The directory these files go into is $ORCASERVICES_DIR/HOSTNAME
-OUTDIR=$ORCASERVICES_DIR/$uname
+# The directory these files go into is $ORCA_SERVICES_DIR/HOSTNAME.
+OUTDIR=$ORCA_SERVICES_DIR/$uname
# Export the environmental variables.
export OUTDIR
-# Check if orcaservices is already running.
-pids=`/usr/ucb/ps auxww | $AWK '/orcaservices.pl/ && !/awk/ {print $2}'`
+# Check if orca_services is already running.
+pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
if test "$pids" != ""; then
- echo "Orcaservices already running. Exiting."
+ echo "Orca_services already running. Exiting."
exit 1
fi
@@ -47,15 +48,16 @@
# Now start the logging.
echo "Starting logging"
HOSTNAME=`hostname`
-if test -f "$libdir/orcaservices.$HOSTNAME"; then
- $libdir/orcaservices.pl `cat $libdir/orcaservices.$HOSTNAME`
+if test -f "$libdir/orca_services.$HOSTNAME"; then
+ $libdir/orca_services.pl `cat $libdir/orca_services.$HOSTNAME`
else
- $libdir/orcaservices.pl
+ $libdir/orca_services.pl
fi
-### # Write the PID of orcaservices to a file to make killing easier.
+### # Write the PID of orca_services to a file to make killing easier.
### pid=$!
-### echo $pid > $OUTDIR/orcaservices.pid
+### echo $pid > $OUTDIR/orca_services.pid
-# Sleep for a couple of seconds to allow any orcaservices warnings to appear.
+# Sleep for a couple of seconds to allow any orca_services warnings to
+# appear.
sleep 5
Modified: trunk/orca/contrib/orca_services/orca_services.pl.in
==============================================================================
--- trunk/orca/contrib/orca_services/orca_services.pl.in (original)
+++ trunk/orca/contrib/orca_services/orca_services.pl.in 2002-11-09 20:43:07.000000000 -0800
@@ -1,6 +1,6 @@
##
##
-## OrcaServices.pl, a log generating services usage monitor
+## Orca_services.pl, a log generating services usage monitor
##
##
@@ -133,11 +133,11 @@
my $def_smtp_logfile = "/var/log/syslog";
my $def_merit_radius_logfile = "/usr/local/etc/raddb/logfile";
my $def_pop_logfile = "/var/log/ipop3d.log";
-my $def_outputdir = "/var/orca/orcaservices";
+my $def_outputdir = "@VAR_DIR@/orca_services";
my $def_pid = "$def_outputdir/${progname}.pid";
-my $def_compress = "/usr/local/bin/gzip -9";
+my $def_compress = "@COMPRESSOR@";
-my $def_radius_auth = "/usr/local/lib/orcaservices.DB.$nodename";
+my $def_radius_auth = "/usr/local/lib/orca_services.DB.$nodename";
my $def_mailq = "on";
@@ -466,7 +466,7 @@
## $mon++;
-## $BASE_ACCUM_radius_DB="/var/orca/orcaservices/$nodename";
+## $BASE_ACCUM_radius_DB="/var/orca/orca_services/$nodename";
## $ACCUM_radius_DB= "$BASE_ACCUM_radius_DB/radiatorRadiusAccum.$year$mon.txt";
## `$TOUCH $ACCUM_radius_DB`;
Modified: trunk/orca/contrib/orca_services/orca_services_running.pl.in
==============================================================================
--- trunk/orca/contrib/orca_services/orca_services_running.pl.in (original)
+++ trunk/orca/contrib/orca_services/orca_services_running.pl.in 2002-11-09 20:43:07.000000000 -0800
@@ -1,4 +1,4 @@
-# orcaservices_running: warn if orcaservices files are not up to date.
+# orca_services_running: warn if orca_services files are not up to date.
#
# Copyright (C) 2000 Carlos Canau and KPNQwest Portugal
# Copyright (C) 1998, 1999 Blair Zajac and Yahoo!, Inc.
@@ -8,7 +8,7 @@
# Set this to the list of directories that contain the output from
# percoservices.se.
-my @stats_dirs = ('@ORCASERVICES_DIR@');
+my @stats_dirs = ('@VAR_DIR@/orca_services');
foreach my $stats_dir (@stats_dirs) {
Modified: trunk/orca/contrib/orca_services/restart_orca_services.sh.in
==============================================================================
--- trunk/orca/contrib/orca_services/restart_orca_services.sh.in (original)
+++ trunk/orca/contrib/orca_services/restart_orca_services.sh.in 2002-11-09 20:43:07.000000000 -0800
@@ -1,12 +1,12 @@
#!/bin/sh
-# This stops and restarts orcaservices.se.
+# This stops and restarts orca_services.
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-# Kill any running orcaservicess.
-$bindir/stop_orcaservices
+# Kill any running orca_servicess.
+$bindir/stop_orca_services
-# Start the orcaservices.
-$bindir/start_orcaservices
+# Start the orca_services.
+$bindir/start_orca_services
Modified: trunk/orca/contrib/orca_services/S99orca_services.sh.in
==============================================================================
--- trunk/orca/contrib/orca_services/S99orca_services.sh.in (original)
+++ trunk/orca/contrib/orca_services/S99orca_services.sh.in 2002-11-09 20:43:07.000000000 -0800
@@ -6,17 +6,17 @@
case "$1" in
'start')
- if [ -x $bindir/start_orcaservices ]; then
+ if [ -x $bindir/start_orca_services ]; then
umask 022
- $bindir/start_orcaservices
+ $bindir/start_orca_services
else
- echo "$0: $bindir/start_orcaservices does not exist or is not executable."
+ echo "$0: $bindir/start_orca_services does not exist or is not executable."
fi
;;
'stop')
- if [ -x $bindir/stop_orcaservices ]; then
- $bindir/stop_orcaservices
+ if [ -x $bindir/stop_orca_services ]; then
+ $bindir/stop_orca_services
fi
;;
Modified: trunk/orca/contrib/orca_services/stop_orca_services.sh.in
==============================================================================
--- trunk/orca/contrib/orca_services/stop_orca_services.sh.in (original)
+++ trunk/orca/contrib/orca_services/stop_orca_services.sh.in 2002-11-09 20:43:08.000000000 -0800
@@ -2,17 +2,17 @@
AWK=@AWK@
-# Kill any running orcallators.
-pids=`/usr/ucb/ps auxww | $AWK '/orcaservices.pl/ && !/awk/ {print $2}'`
+# Kill any running orca_services.
+pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
if test "$pids" != ""; then
echo "Killing pids $pids."
kill -HUP $pids
sleep 1
- pids=`/usr/ucb/ps auxww | $AWK '/orcaservices.pl/ && !/awk/ {print $2}'`
+ pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
if test "$pids" != ""; then
kill -TERM $pids
sleep 1
- pids=`/usr/ucb/ps auxww | $AWK '/orcaservices.pl/ && !/awk/ {print $2}'`
+ pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
if test "$pids" != ""; then
kill -9 $pids
sleep 1
Modified: trunk/orca/contrib/orca_services/orca_services.cfg.in
==============================================================================
--- trunk/orca/contrib/orca_services/orca_services.cfg.in (original)
+++ trunk/orca/contrib/orca_services/orca_services.cfg.in 2002-11-09 20:43:08.000000000 -0800
@@ -25,8 +25,8 @@
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 orca_services files for the new day.
+# 1:00 to pick up late comer orca_services 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.
@@ -39,12 +39,23 @@
warn_email root at localhost
late_interval interval + 30
-#
-# ATTENTION: hardcoded /var/orca/orca_services/ in find_files
-# you might need to change this to your values
-#
+# This defines where the find the source data files and the format of
+# those files. Notes about the fields:
+# find_files
+# You'll notice that all but the first () has the form (?:...).
+# This tells Perl to match the expression but not save the matched
+# text in the $1, $2, variables. Orca uses the matched text to
+# generate a subgroup name, which is used to place files into
+# different subgroups. Here, only the hostname should be used to
+# generate a subgroup name, hence all the (?:...) for matching
+# anything else.
+# interval
+# The interval here must match the interval used by orca_services to
+# record data. Do not change this, as it has an effect on the
+# generated RRD data files.
+
group orca_services {
-find_files /var/orca/orca_services/(.*)/(?:(?:orca_services)|(?:percol))-\d{4}-\d{2}-\d{2}(?:\.(?:Z|gz|bz2))?
+find_files @VAR_DIR@/orca_services/(.*)/(?:(?:orca_services)|(?:percol))-\d{4}-\d{2}-\d{2}(?:\.(?:Z|gz|bz2))?
column_description first_line
date_source column_name timestamp
date_format %s
Modified: trunk/orca/contrib/orca_services/README
==============================================================================
--- trunk/orca/contrib/orca_services/README (original)
+++ trunk/orca/contrib/orca_services/README 2002-11-09 20:43:08.000000000 -0800
@@ -1,6 +1,6 @@
##
##
-## Orca_Services.pl, a log generating services usage monitor
+## Orca_services.pl, a log generating services usage monitor
##
##
More information about the Orca-checkins
mailing list