Channel Archive Manager

This is a simple frontend to the ChannelArchiver.

It manages and observes ArchiveEngine processes and their appropriate directories.

The Channel Archive Manager (CAManager) consists of two programs:


CAManager

The main frontend.

CAManager is a GUI Application, that enables you to configure and start/stop ArchiveEngine processes. You can also configure the properties of the ArchiveEngine. CAManager also provides simple interfaces to the applications ArchiveManager and ArchiveExport, so you have access to the following functions/tools.


Creating/Configuring an Archiver

A double-click on an archiver (an entry of the table in the main screen) opens the configuration-dialog. If you create a new archiver, the configuration-dialog also opens automatically.

If the archiver you are configuring is currently running, some of the configurable properties in the dialog are disabled.

A button with three dots in it opens a file-selection dialog. Most other string entries have a list of suggestions and settings, that are in available in another configuration, attached to it.

The space below the Run/Rerun configuration option changes it's contents according to the selected Run/Rerun scheme.

You have to configure the following properties:


Host
The host on which the ArchiveEngine should run.

Port
The portnumber for the ArchiveEngine web interface
You have to ensure, that there are no collisions with other applications using the same port!

Configuration-file
The main configuration file containing archiving-parameters and channel names as well as !group statements to include other files.
This parameter has to be a full pathname (starting with a "/" or e.g. "C:/" resp.)

disable configuration changes ...
check this flag if you want to disable the online configuration interface of the ArchiveEngine. This is especially useful to avoid conflicting changes, if you create your configuration from a different source.

Archive-file

This is the name of the archive directory file - the central register of what is archived in this archive. This parameter shouldn't be an abslolute pathname but a filename relative to the directory of the configuration file.

The filename may contain directory components as well, but shouldn't start with a "/".

It may also contain special components (starting with a "%") that are replaced by strings depending on the current time.

These components are:

%Ycurrent year (e.g. 2001)
%mcurrent month (e.g. 10)
%Babbreviated name of the current month (e.g. October)
%babbreviated name of the current month (e.g. Oct)
%Vcurrent weeknumber (e.g. 41)
%dday of month (e.g. 09)
%pAM or PM
%Hhour (24h format)
%Ihour (12h format)
%Mminute
%Ssecond
%%a single percent sign
...(see man strftime for details)

If this parameter contains a directory-component that is different from the current directory, the CAbgManager will create the appropriate directories before starting the archiver. All configuration files are then copied into this new directory. As the archiver terminates all configuration files are copied back into the main configuration directory and (if a directory named CVS is available) checked into cvs automatically to make online configuration changes persistent.


Log-file

The ArchiveEngine logs it's output to this file.

This should also be a filename relative to the directory of the configuration file.

"%"-rules are applied like with the Archive-file option.


Run/Rerun

The CAbgManager is able to stop and restart archivers based on a certain schedule.

This is especially useful, if you automatically want archives to be switched e.g. every week. In this case, set the Run/Rerun mode to weekly, select the appropriate weekday and time, when archives should be switched and set the Archive-file configuration option to e.g. "%Y/%V/directory".

In this case the archiver would create one archive per week in a directory named [year]/[weeknumber]/directory. This directory will also be added to a Multi-Archive directory file in the directory of the main configuration file which may then e.g. look like this for an archiver rerun daily:

master_version=1
# added by CAbgManager @ Thu Oct 09 06:00:02 MDT 2001
/cs/epics/extensions/src/ChannelArchiver/CAManager/sampleArchives/another example/2001/10/09/directory
# added by CAbgManager @ Thu Oct 08 06:00:02 MDT 2001
/cs/epics/extensions/src/ChannelArchiver/CAManager/sampleArchives/another example/2001/10/08/directory
# added by CAbgManager @ Thu Oct 07 06:00:02 MDT 2001
/cs/epics/extensions/src/ChannelArchiver/CAManager/sampleArchives/another example/2001/10/07/directory
# added by CAbgManager @ Thu Oct 06 06:00:02 MDT 2001
/cs/epics/extensions/src/ChannelArchiver/CAManager/sampleArchives/another example/2001/10/06/directory
# added by CAbgManager @ Thu Oct 05 06:00:02 MDT 2001
/cs/epics/extensions/src/ChannelArchiver/CAManager/sampleArchives/another example/2001/10/05/directory
# added by CAbgManager @ Thu Oct 04 06:00:02 MDT 2001
/cs/epics/extensions/src/ChannelArchiver/CAManager/sampleArchives/another example/2001/10/04/directory
...
	  

This Multi-Archive directory file can then be used to access the whole archive at once.


Blocking an archiver

When an archiver that is supposed to run terminates (either intentionally or not)), the archiver is automatically restarted by the CAbgManager.
In certain cases, you might want to prevent this archiver from being restarted (e.g. for reconfiguration, during a special shutdown...).

In this case you may block such an archive. Just check the checkbox for the appropriate archiver in the rightmost column of the main window.
See CAbgManager / Blocked Archivers for further details.


Test

A simple frontend to the command

    ArchiveManager -test <archive>
      

The test-command test an archive for errors.


Info

A simple frontend to the command

    ArchiveManager -info <archive>
      

The info-command counts the number of channels in the archive and prints the min and max timestamps in the archive.


Export

A simple frontend to the commands

    ArchiveManager -xport [new archive] ...
      

for exporting to another archive, or

    ArchiveExport ...
      

for exporting to a spreadsheet/matlab/gnuplot-file.

The first version Exporting to another archive can be used to

The second version is mainly for further processing with e.g. Excel, Origin, Matlab...


CAbgManager

This process has no GUI and doesn't produce output.

It reads the current configuration and starts/stops/restarts ArchiveEngines after preparing the appropriate directories.

The actions of CAbgManager and the status of configured ArchiveEngines can be observed via a web-page (http://<hostname>:<port>/) where port defaults to 4610. The port-setting can be configured in the CAManager Edit/Preferences dialog.

Configuration is re-read as it changes and jobs are rescheduled to match the new configuration.

The port-setting applies on restart of the CAbgManager.

By default CAManager automatically checks for a running CAbgManager on startup.


Blocked Archivers

The CAbgManager starts every configured archiver, that is supposed to run as long as the archiver is not blocked. If it is blocked and hence the CAbgManager can't restart it. A corresponding message is appended to the action-log.


Commands

The web-interface of CAbgManager can be used to start or stop archivers.
These start and stop actions automatically unblock (start) or block (stop) the automatic restart of an archiver.

If you query the page "http://<hostname>:<port>/stop", the CAbgManager is stopped.


Latest modification: 09 Oct 01 14:11:43 Thomas Birke
birke@lanl.gov