Remstats Home


  About remstats
  architecture
  Release Notes
  FAQ
  Conventions
  Prerequisites
  Installation
  Configuration
  Configuration Tools
  Servers
  Collectors
  Updater
  Monitors
  pagemakers
  run-remstats2
      run-remstats
      check-config
      remstats-monitor
  CGIs
  troubleshooting
  do-traceroutes
  Miscellany
  Thank-you
  Index


  Live Data

  Remstats was written by
  Thomas Erskine at the
  CRC in Canada and now
  at SourceWorks.

[Top] [Prev] [Next]

run-remstats - run a complete cycle

Usage:

Can't locate remstats.pl in @INC (@INC contains: . /usr/lib/remstats/lib /usr/lib/perl5/ /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at ../run-remstats line 35.

Description:

This is obsolete. You should be running L<run-remstats2 instead.

run-remstats is the main script for a remstats collection machine. As a simplified overview:

  • check-config is run first.
  • In parallel, all the collectors are run, each feeding it's own updater process. Some of them query remstats servers, some get their information in other ways. So you have a bunch of pipelines like:
    	xxx-collector | updater xxx
  • When all the collectors have finished, the monitors get run in parallel to figure out what's happening.
  • Afterwards, if the configuration directory has changed, run the pagemakers, to re-do the web-pages.
  • Finally, it prints all the stderr output of all the various programs, separated by program.

For each of these programs, run-remstats will set a timer (see watchdogtimer in the general config-file). If the timer expires and the program is still running, run-remstats will kill that process. This avoids the problem of a hanging collector hanging the whole remstats cycle.

It also manages a lock-file to make sure that two instances don't run concurrently. The lock-file's name is based on the name of the run-remstats script. (See Running multiple copies of run-remstats below.)

It keeps a status file in the configured temp directory (/var/lib/remstats/tmp by default) which is used by monitor to show where the run-remstats process has gotten to.

When starting, it will also look for a file in the tmp directory called STOP-run-remstats (default), and if it exists, will refuse to run at all.

Running multiple copies of run-remstats

If you symlink run-remstats to run-remstats-XXX, then the default configuration directory for run-remstats-XXX will be /etc/remstats/config-XXX. Since the lock-file is named for the script which invokes it, you won't have collisions between the two instances, as long as your configuration files don't conflict. You can have multiple collector-only instances collecting data which is formatted by a single pagemaker instance, (in theory) but this will require at least three config-dirs which must be closely co-ordinated. If you want to do this for performance reasons, I do plan to address this in future.

Configuration:

See the general config-file. The lines to configure run-remstats are:

	pinger, collectors, monitors, pagemakers, watchdogtimer


[Top] [Remstats] [SourceWorks] [RRDtool] [SourceForge]
Last updated Fri Jun 22 13:37:47 GMT 2007 by <terskine@users.sourceforge.net>.