You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This document describes the current state of automated PV archiving procedures and scripts for LCLS.

Unless otherwise noted all scripts operate on and connect to the LCLS Archiver Appliance instance (managed directly via http://lcls-archapp.slac.stanford.edu/mgmt/ui/index.html).

lclsResumePausedPVs

Cronjob:

lcls-prod01 00 * * * * /afs/slac/g/lcls/package/ArchiverAppliance/tools/script/lclsResumePausedPVs.sh

Log:

 /tmp/lclsResumePausedPVs.log

 

Schedule: Every hour


Description:
Gets a list of PVs that are paused and then resumes the archive request for each active PV.
Optionally, we can pass in a folder with a list of .archive files.
Only those paused PV's which are present in archive files that have been modified recently will be checked.


Example report:

Sent to: controls-cd, ppascual, bhill

2020-03-11 10:00:49,382 - _main_ - INFO - 98938 PVs are paused
2020-03-11 10:00:50,056 - _main_ - INFO - Processing recently changed file ioc-bsy0-mp01/archive/MPS_LinkProcessor.archive
2020-03-11 10:00:50,133 - _main_ - INFO - Processing recently changed file ioc-feh1-pp01/archive/ioc-feh1-pp01.archive
2020-03-11 10:00:50,138 - _main_ - INFO - Processing recently changed file ioc-in20-pp01/archive/ioc-in20-pp01.archive
2020-03-11 10:00:50,144 - _main_ - INFO - Processing recently changed file ioc-ltuh-pp01/archive/ioc-ltuh-pp01.archive
2020-03-11 10:00:50,149 - _main_ - INFO - Processing recently changed file ioc-sys0-pp01/archive/ioc-sys0-pp01.archive
2020-03-11 10:00:50,154 - _main_ - INFO - Processing recently changed file ioc-undh-uc13/archive/ioc-undh-uc13.archive
2020-03-11 10:00:50,158 - _main_ - INFO - Processing recently changed file ioc-undh-uc14/archive/ioc-undh-uc14.archive
2020-03-11 10:00:50,162 - _main_ - INFO - Processing recently changed file ioc-undh-uc15/archive/ioc-undh-uc15.archive
2020-03-11 10:00:50,167 - _main_ - INFO - Processing recently changed file ioc-undh-uc16/archive/ioc-undh-uc16.archive
2020-03-11 10:00:50,170 - _main_ - INFO - Processing recently changed file ioc-undh-uc17/archive/ioc-undh-uc17.archive
2020-03-11 10:00:50,174 - _main_ - INFO - Processing recently changed file ioc-undh-uc18/archive/ioc-undh-uc18.archive
2020-03-11 10:00:50,178 - _main_ - INFO - Processing recently changed file ioc-undh-uc19/archive/ioc-undh-uc19.archive
2020-03-11 10:00:50,182 - _main_ - INFO - Processing recently changed file ioc-undh-uc20/archive/ioc-undh-uc20.archive
2020-03-11 10:00:50,186 - _main_ - INFO - Processing recently changed file ioc-undh-uc21/archive/ioc-undh-uc21.archive
2020-03-11 10:00:50,190 - _main_ - INFO - Processing recently changed file ioc-undh-uc22/archive/ioc-undh-uc22.archive
2020-03-11 10:00:50,194 - _main_ - INFO - Processing recently changed file ioc-undh-uc23/archive/ioc-undh-uc23.archive
2020-03-11 10:00:50,198 - _main_ - INFO - Processing recently changed file ioc-undh-uc24/archive/ioc-undh-uc24.archive
2020-03-11 10:00:50,209 - _main_ - INFO - Processing recently changed file ioc-undh-uc25/archive/ioc-undh-uc25.archive
2020-03-11 10:00:50,222 - _main_ - INFO - Processing recently changed file ioc-undh-uc26/archive/ioc-undh-uc26.archive
2020-03-11 10:00:50,233 - _main_ - INFO - Processing recently changed file ioc-undh-uc27/archive/ioc-undh-uc27.archive
2020-03-11 10:00:50,245 - _main_ - INFO - Processing recently changed file ioc-undh-uc28/archive/ioc-undh-uc28.archive
2020-03-11 10:00:50,249 - _main_ - INFO - Processing recently changed file ioc-undh-uc29/archive/ioc-undh-uc29.archive
2020-03-11 10:00:50,261 - _main_ - INFO - Processing recently changed file ioc-undh-uc30/archive/ioc-undh-uc30.archive
...


Notes:

Script set to check PVs in $IOC_DATA/<IOC>/archive/*.archive files modified within the past 60 days
Processes 100 PVs at a time


lclsProcessArchiveFiles

Cronjob:

lcls-prod01 00 1 * * * /afs/slac/g/lcls/package/ArchiverAppliance/tools/script/lclsProcessArchiveFiles.sh

Log:

/tmp/lclsProcessArchiveFiles.log


Schedule: Daily at 01:00


Description:
This is one of the steps used in automation of archiver configuration.
This assumes the requests for the archiver are somehow stored in the IOC (perhaps in INFO fields) and then submitted as archive files.
Archive files are consolidated together into a IOC_DATA like folder and can be identified using a bash glob expression.
Archive files are space/tab separated text files with these rules
1) They can have blank lines
2) They can have comment lines beginning with a #
3) Space/tab separated lines are interpreted as PVName, sampling period (in secs), sampling method (one of scan/monitor).
4) The PVName is mandatory; the other two are optional in which case defaults (optional arguments to this script)  are applied.

 

Example report:

Sent to: controls-cd, ppascual, bhill

2020-03-11 01:02:31,767 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-bsy0-mp01/archive/MPS_LinkProcessor.archive
2020-03-11 01:02:32,150 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-feh1-pp01/archive/ioc-feh1-pp01.archive
2020-03-11 01:02:32,155 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-in20-pp01/archive/ioc-in20-pp01.archive
2020-03-11 01:02:32,161 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-ltuh-pp01/archive/ioc-ltuh-pp01.archive
2020-03-11 01:02:32,166 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-sys0-pp01/archive/ioc-sys0-pp01.archive
2020-03-11 01:02:32,171 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-undh-uc42/archive/ioc-undh-uc42.archive
2020-03-11 01:02:32,182 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/ioc-xrt1-pp01/archive/ioc-xrt1-pp01.archive
2020-03-11 01:02:32,187 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-acr0-pp01/archive/sioc-acr0-pp01.archive
2020-03-11 01:02:32,192 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsy0-pp01/archive/sioc-bsy0-pp01.archive
2020-03-11 01:02:32,197 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsy0-pp02/archive/sioc-bsy0-pp02.archive
2020-03-11 01:02:32,202 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsyh-mp01/archive/LNarchive.archive
2020-03-11 01:02:32,263 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsyh-mp03/archive/LNarchive.archive
2020-03-11 01:02:32,323 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsys-bp01/archive/sioc-bsys-bp01.archive
2020-03-11 01:02:32,362 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsys-mp01/archive/LNarchive.archive
2020-03-11 01:02:32,423 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-bsys-mp04/archive/LNarchive.archive
2020-03-11 01:02:32,483 - _main_ - INFO - Processing file /mccfs2/u1/lcls/epics/ioc/data/sioc-clts-bp01/archive/sioc-clts-bp01.archive
2020-03-11 01:02:37,643 - _main_ - INFO - Submitting 1137 new PVs to the archiver
2020-03-11 01:02:37,643 - _main_ - INFO - Submitting these PVs to the archiver BPMS:BSYS:865:TMIT1H,BPMS:LTUS:150:CALBTDES,TPR:BSYS:BP01:0:TPRTRIG04,BPMS:LTUS:150:USCL,TPR:BSYS:BP01:0:RTMOUT2TWID,TPR:BSYS:BP01:0:RTMOUT1TWID,TPR:BSYS:BP01:0:CH02_CNT,BPMS:LTUS:150:YOFF,TPR:BSYS:BP01:0:TRG12_TDESTICKS,TPR:BSYS:BP01:0:TPRTRIG13,TPR:BSYS:BP01:0:CH04_RATE,BPMS:LTUS:150:XOFF.E,TPR:BSYS:BP01:0:CH11_RATE,TPR:BSYS:BP01:0:TRG06_SOURCE,TPR:BSYS:BP01:0:CH12_RATEMODE,TPR:BSYS:BP01:0:TRG09_SYS0_TCTL,TPR:BSYS:BP01:0:TRG01_SOURCE,TPR:BSYS:BP01:0:CH12_FIXEDRATE,TPR:BSYS:BP01:0:CH09_ACRATE,TPR:BSYS:BP01:0:TRG04_SOURCE,TPR:BSYS:BP01:0:RTMOUT0SOURCE,BPMS:LTUS:150:Y.AOFF,TPR:BSYS:BP01:0:CH12_TSMASK,TPR:BSYS:BP01:0:TPRTRIG10,TPR:BSYS:BP01:0:CH01_RATE,BPMS:LTUS:150:TDES,TPR:BSYS:BP01:0:CH07_TSMASK,TPR:BSYS:BP01:0:TPRTRIG00,BPMS:LTUS:150:GRN_SLOW,TPR:BSYS:BP01:0:TRG02_SYS0_TWID,TPR:BSYS:BP01:0:CH15_CNT,TPR:BSYS:BP01:0:CH12_CNT,TPR:BSYS:BP01:0:CH08_RATE,TPR:BSYS:BP01:0:CH05_CNT,BPMS:BSYS:865:YAOFF,TPR:BSYS:BP01:0:CH13_CNT,TPR:BSYS:BP01:0:TRG14_SYS0_TDES,TPR:BSYS:BP01:0:TRG05_TWIDTICKS,TPR:BSYS:BP01:0:TRG00_SOURCE,TPR:BSYS:BP01:0:TRG08_SYS2_TCTL,
...



Notes:

Archives PVs in $IOC_DATA/<IOC>/archive/*.archive files modified within the past 7 days
Defaults archive parameters for PVs to 1.0s, MONITOR


lclsPauseDisconnectedPVs

Cronjob:

lcls-prod01 00 2 * * 3,4 /afs/slac/g/lcls/package/ArchiverAppliance/tools/script/lclsPauseDisconnectPVs.sh

Log:

/tmp/lclsPauseDisconnectedPVs.log


Schedule: Every Wednesday and Thursday at 02:00


Description:
Gets a list of PVs that are disconnected and then pauses those that have not connected for a specified amount of time.

 

Example report:

Sent to: controls-cd, ppascual, bhill

2020-02-12 02:00:06,347 - _main_ - INFO - 9149 PVs are disconnected
2020-02-12 02:00:06,371 - _main_ - INFO - 303 PVs have been disconnected for more than 86400 minutes
2020-02-12 02:00:11,410 - _main_ - INFO - Detected 303 disconnected PVs



Notes:

Pauses PVs that have not connected for the past 24 hours

lclsResumeAllPausedPVs

Cronjob:

lcls-prod01 00 3 * * * /afs/slac/g/lcls/package/ArchiverAppliance/tools/script/lclsResumeAllPausedPVs.sh

Log:

/tmp/lclsResumeAllPausedPVs.log


Schedule: Daily at 03:00


Description:
This script gets a list of PVS that are paused and then resumes the archive request for each active PV.
Optionally, we can pass in a folder with a list of .archive files.
Only those paused PV's which are present in archive files that have been modified recently will be checked

Example report:

Sent to: controls-cd, ppascual, bhill

2020-03-11 03:00:48,430 - _main_ - INFO - 98958 PVs are paused
2020-03-11 06:27:12,587 - _main_ - INFO - Resuming 1 live PVs
2020-03-11 06:27:14,869 - _main_ - INFO - Resuming 3 live PVs
2020-03-11 06:34:17,535 - _main_ - INFO - Resuming 2 live PVs
2020-03-11 06:34:20,094 - _main_ - INFO - Resuming 4 live PVs
2020-03-11 06:34:22,429 - _main_ - INFO - Resuming 4 live PVs
2020-03-11 06:34:24,508 - _main_ - INFO - Resuming 4 live PVs
2020-03-11 06:34:27,125 - _main_ - INFO - Resuming 2 live PVs
2020-03-11 08:31:11,755 - _main_ - INFO - Done.


Notes:

Attempts to resume all paused PVs in the LCLS Archiver Appliance instance
Waits 2 seconds for PVs to connect
Processes 10 PVs at a time

lclsSetupEnv

Notes:

Runs from custom Python3 conda environment
Uses EPICS 3.15.5-1.0 environment
Sets IOC_DATA to LCLS production directory
  • No labels