This document describes the use of the scripts used to modify LCLS archiver engine configuration files in response to requests to add archiver PVs (and/or change the archiving method for existing archiver PVs) or remove archiver PVs. It is important to use scripts for these activities to minimize the time processing requests, minimize processing mistakes, and to avoid the occurrence of any archiver PV appearing more than once in archiver engine configuration files.
This document also describes the processing of an EDM screen "request to be archived" file by scripts used to determine the responsible IOC engineer for PVs in these files. PVs in a "request to be archived" file are generally not automatically added to archiver engine configuration files. First, it is necessary to contact the responsible IOC engineer for each PV in a "request to be archived" file to determine whether each PV needs to be archived and, if so, how it is to be archived (the archiving method).
All of the scripts are contained in the /nfs/slac/g/archiver/lcls_pv_changes directory. A copy of the current version of each archiver engine configuration file is also kept in this directory for use when adding archiver PVs (and/or changing the archiving method for existing archiver PVs) or removing archiver PVs.
Requests to archive PVs from IOC engineers are currently usually made by sending email to the LCLS archiver administrator. There are plans to later replace this procedure by developing an archiver request GUI. These requests are currently made by listing the PVs to be added in the text of an email or in an ASCII attachment file. The archiving method is often specified in the email to apply to all requested archiver PVs in the request. If PVs in the request are to be archived using more than one archiving method, it is helpful if these requests are in the "standard format" described later (Sonya Hoobler and Dayle Kotturi usually submit all of their add PV requests in this "standard format").
Due to the necessity of reducing the load on the LCLS archiver system, requests for large numbers of additional archiver PVs (especially when there is a potential for generating large amounts of archiver data) should be questioned. The goal is to only archive high priority archiver PVs and to choose appropriate archiving methods to not generate excessive archiver data.
Add or remove requested archiver PVs (perhaps already in "standard format" for add requests) need to be copied from the request email text or an ASCII file attachment from a PC environment to the UNIX directory /nfs/slac/g/archiver/lcls_pv_changes. This can be done using the Microsoft Outlook tools to create a file on a PC drive (e.g., the C drive) and use a facility such as WinSCP3 to copy this file to the /nfs/slac/g/archiver/lcls_pv_changes UNIX directory. It is suggested that a standard file name be used, such as arch_pvs.txt.
To efficiently process an archiver add PV request file, it should be converted to "standard format" (if the request is not already in this format). "Standard format" refers to an ASCII text file containing a line for each PV with indications of the archiving method and interval. Each line of such a "standard format" file has three fields, separated by white space (e.g., a space or a tab):
The following assumes a list of PVs to be archived all using the same archive method is in file arch_pvs.txt in directory /nfs/slac/g/archiver/lcls_pv_changes:
The output file in this directory is pv_list.txt, which is in "standard format".
After a file containing PVs to be added or whose archiving method may be changed exists in the "standard format" described above, the add_arch_pvs.pl script may be run to generate new versions of archiver engine configuration files reflecting these requested changes. This script discards any lines containing PVs that appeared previously in the file. It also searches all of the existing archiver engine configuration files for occurrences of PVs in the input request file of PVs to be added or whose archiving method may be changed. For each PV name match, a new version of the configuration file containing the PV is made if the input request file indicates the archiving method or interval is different in order to reflect the archiving method and interval in the request file. If there there are any PVs in the input request file that are new, the user is prompted for the name of the archiver engine configuration file to be modified and then is asked to choose then archiver group in this file into which the new archiver PVs will be added.
The following assumes a request file pv_list.txt in "standard format" in directory /nfs/slac/g/archiver/lcls_pv_changes:
New versions of configuration files will have the extension ".new". For the example above, a new version of the lcls_2-group.xml file named lcls_2-group.xml.new would be created. There may be multiple new version configuration files generated from invoking the add_arch_pvs.pl script (e.g., including new versions of configuration files that contain PVs in the input request file which specify different values of the archive method or interval than was in the current configuration file).
After invoking the add_arch_pvs.pl script, the next action to take is to move the
new version of each configuration file that was generated into the current configuration
file. For example:
EXCEPTION: If a configuration file was modified due to PVs in this configuration
file matching one or more PVs in the request file and the archive method or interval
was different, the modification will create a version with the ".new" extension
(e.g., lcls_2-group.xml.new). Also if the current version of this file was specified
for also adding new archiver PVs, an additional new version of the configuration file
will be generated (e.g., lcls_2-group.xml.new.new). In this case, the response should
then be to move the "new new" version of this configuration file that was generated
into the current configuration file and to delete the plain "new" version (which was
modified to create the "new new" version). For example:
After processing, there should be no files with the ".new" or ".new.new" extensions. All modified versions of the current archiver configuration files in this directory should then be copied to their respective current engine data directories (/arch/lcls/lcls_nn, where "nn" is the single or double digit engine number). Before copying, it is important to retain the two previous versions the configuration file for each such current engine data directory in case changes need to be backed out. Afterwards, the current version of each archiver engine configuration file in the /nfs/slac/g/archiver/lcls_pv_changes directory should have the same contents as its respective copy of the configuration file in its /arch/lcls/lcls_nn current engine data directory. After copying, the engines for modified versions of the configuration files should be restarted to use these new current versions.
Occassionally, a request is made to remove archiver PVs. An ASCII text request file containing the name of each PV to be removed should be created (each line in this file containing one PV name). It is not important whether the file contains the name of some PVs which are not currently being archived.
First, the names of the archiver engine configuration files containing the archiver
PVs to be removed must be determined. The following assumes the file containing
the list of archiver PVs to be removed is named arch_pvs.txt and this file is in
the /nfs/slac/g/archiver/lcls_pv_changes directory:
The following assumes the file containing the list of archiver PVs to be removed is
A new version of the specified archiver engine configuration file configuration file with the extension ".new" will be created. Repeat the invocation of the remove_pvs2.pl script for each configuration file containing PVs to be removed identified by the previous running of the find_engines_of_remove_pvs.pl script.
Follow the directions explained in the previous "Generate New Versions of Archiver Engine Configuration Files" section after the explanation of running the add_arch_pvs.pl regarding moving newly generated versions of the archiver engine configuration files as well as subsequent actions leading up to the final step of restarting engines for modified versions of the configuration files.
LCLS EDM screens have a "request to be archived" feature (by selecting a PV and using the "control-middle mouse" to bring up a "request to be archived" menu item). This feature enables MCC Operations to append PV names to a "request to be archived" file, which should be checked daily by the LCLS archiver administrator. The request archiver PVs in this file should not be automatically added to archiver engine configuration files, however. For most PV names in this file it is necessary to try to determine the responsible IOC engineer for the PV and contact this person to decide whether the PV actually needs to be archived and, if so, the archiving method which should be used. Also if a PV in this request list needs to be archived, the reponsible IOC engineer may be reminded to request similar PVs to also be archived.
The current LCLS "request to be archived" file is located in LCLS productions systems:
/u1/lcls/tools/ArchiveBrowser/toBeArchivedList. If this file is not present, this indicates
that no new requests for PVs to be archived have been made recently. To process this file:
Author: Bob Hall 14-Jul-2010