User Tools

Site Tools


postproc:arcdeletecont
Program Name

arcDelete

PCS stream-state
  • group: TPP table: TPP state: DeleteArc
Description

arcDelete creates event deletion messages and exports them to configured destinations. The deletion message consists of the single line “DELETE <evid>”. The export mechanism can be email, scp to remote location, or two-step copy to a local directory such as the input directory for the sendfileII program.

There is one instance of arcDelete running on ucbpp, to handle events that have been DELETED by jiggle.

arcDelete runs a typical PCS client loop:

  • queries for the next event in its assigned stream-state
  • if an event is found, create the event deletion message.
  • distribute the file to all of the configured destinations
    • MAIL: run “/usr/bin/mailx -s NC<evid>.del <to-address” to mail the file
    • DIR: copy the file to the specified temporary directory, then “mv” the file to the destination directory. This ensures that only complete files are visible in the destination directory.
    • SCP: run scp to copy the file to configured destinations. This requires appropriate configuration for scp on the local and remote machines.
  • delete the file from the work directory after it has been distributed.
  • set the stream-state event result to 1 and repeat the loop
  • if no event is found, sleep 30 seconds and repeat the loop
Program Location

post-proc systems: /home/ncss/ncpp/arcDelete/bin

Configuration File

/home/ncss/arcExport/delete/conf/arcDelete.conf

Sample configuration file:

# Config file for arcDelete
# dbase: name of database to connect to for PCS work
dbase      dcucb
PCSgroup   TPP
PCStable   TPP
PCSstate   DeleteArc
# sleepTime: how long in seconds to wait to check for next event
sleepTime  30
# workDir: directory in which to create arc files
workdir    /home/ncss/ncpp/arcDelete/delete/work
#
# Destinations: one or more of any of the following:
# Directories must already exist!
# Mail  email-address
# Dir   temp-dir final-dir
# SCP   scp-target like user@host:dist_dir
Dir  /home/ncss/run/send_arc_image1/temp /home/ncss/run/send_arc_image1/send
Dir  /home/ncss/run/send_arc_image2/temp /home/ncss/run/send_arc_image2/send
Source of Database name

Configuration file.

Cron Starter Program
8,18,28,38,48,58 * * * * /home/ncss/ncpp/arcExport/bin/startArcDelete
Log File

/home/ncss/ncpp/arcExport/delete/logs/arcDelete.log

Other Programs Called

/usr/bin/mailx, /usr/bin/scp for distributing the archive file

postproc/arcdeletecont.txt · Last modified: 2018/01/09 15:23 by 127.0.0.1