- description: sddssnapshot reads values of process variables and writes them to a file. An input file lists the
process variables to be read.
sddssnapshot may operate in a server mode in which a new file is written to the named output file whenever
the signal SIGUSR1 is received by sddssnapshot. All data in the input file (even those not needed by the
program) are transferred to the output file. sddssnapshot is more for data collection as opposed to backup
and restore.
- examples: The state of the APS storage ring is saved by writing values of process variables listed in SR.req to the
snapshot file SR.snp:
sddssnapshot SR.req SR.snp -nameOfData="Value"
where the contents of the file SR.req are
SDDS1
&column
name = ControlName, type = string, &end
&data
mode = ascii, no_row_counts=1 &end
S1A:Q1:CurrentAO
S1A:Q2:CurrentAO
...
- synopsis:
usage: sddssnapshot [-pipe[=input][,output]] [<input>] [<output>]
[-pendIOtime=<seconds>] [-unitsOfData=<string>] [-nameOfData=<string>]
[-serverMode=<pidFile>] [-average=<number>,<intervalInSec>]
Takes a snapshot of EPICS scalar process variables.
Requires the column "ControlName" with the process variable names.
For server mode, writes a new file to the given filename whenever
SIGUSR1 is received. Exits when SIGUSR2 is received.
- files:
- input file:
The input file is an SDDS file with at least one column:
- ControlName — Required string column for the process variable or device name.
- output file:
The output file contains all columns of the input file including those not needed by the program plus a column
named on the command line option -nameOfData. This column is defined as a double type and contains the
readback values. Optionally the units of that readback column may be specified on the command line. Of
course this option is useful only if all the process variables have the same units, as in the case of
recording orbit values from all bpms. If the -average option is requested, then an additional
double column is created with the name of the readback column with the “StDev” appended to
it.
- pid file:
A process id file is created with option serverMode=<pidFile>. This file contains a single number which is the
pid number of the running sddssnapshot process.
- switches:
- -pipe[=input][,output] — The standard SDDS Toolkit pipe option.
- -pendIOtime=<seconds> — Sets the maximum time to wait for channel access operations to complete.
- -nameOfData=<string> — Column name to be given to the data collected. Default name is “Value”.
- -unitsOfData=<string> — Optional. Name given to the units field of the column definition of the
data to be collected. Default value is the null string.
- -serverMode=<pidFile> — Optional. Enables the server mode. The file specified will be created and
contain the process number of the present sddssnapshot process. This file is the mechanism through
which the user will know to which process should the SIGUSR1 be sent. To activate one snapshot write,
the user can type the command “kill -SIGUSR1 ‘cat <pidFile>‘”.
- -average=<number>,<intervalInSec> — Optional. One can specify the number of readings to
average and the number of seconds interval between readings.
- see also:
- author: Michael Borland, ANL/APS.