sddslogger
reads values of process variables and writes them to a file at a specified time interval.
One or more input files defines the process variables to be monitored.
sddslogger SRvac.mon SRvac.sdds -time=24,hours -sampleInterval=1,minutewhere the contents of the file
SRvac.mon
are
SDDS1 &description &end &column name = ControlName, type = string, &end &column name = ControlType, type = string, &end &column name = ReadbackUnits, type = string, &end &column name = ReadbackName, type = string, &end &data mode = ascii, no_row_counts=1 &end ! page number 1 S35DCCT:currentCC pv mA S35DCCT VM:01:3IP1.VAL pv Torr VM:01:3IP1 VM:01:2IP2.VAL pv Torr VM:01:2IP2 VM:01:2IP3.VAL pv Torr VM:01:2IP3 ...
usage: sddslogger <SDDSinputfile1> <SDDSoutputfile1> <SDDSinputfile2> <SDDSoutputfile2>... [-generations[=digits=<integer>][,delimiter=<string>][,rowlimit=<number>][,timelimit=<secs>] | -dailyFiles] [-sampleInterval=<real-value>[,<time-units>] [-logInterval=<integer-value> [-steps=<integer-value> | -time=<real-value>[,<time-units>]] [-enforceTimeLimit] [-offsetTimeOfDay] [-verbose] [-singleshot{=noprompt | stdout}] [-precision={single|double}] -onerror={usezero|skiprow|exit} [-pendIOtime=<value>] [-conditions=<filename>,{allMustPass | oneMustPass}[,touchOutput][,retakeStep]] Writes values of process variables or devices to a binary SDDS file.
The input files are SDDS files with a few data columns required:
The conditions file is an optional input file specified on the command line which lists conditions that must be satisfied at each time step before the data can be logged.
The file is like the main input file, but has numerical columns LowerLimit
and UpperLimit
.
The minimal column set is ControlName
, which contain the PV names, and the two limits columns above.
Depending on comand line options, when any or all PV readback from this file
is outstide the range defined by the corresponding data from LowerLimit
and UpperLimit
,
none of the data of the PVs in the input files are recorded.
When this situation occurs for a long period of time, the size of the output files doesn't
change, and it may appear that the monitoring process has somehow stopped.
It is possible to check the program activity with the touch
sub-option
which causes the logging program to touch the output file at every step.
The output files contains one data column for each process variable named in the corresponding input file. By default, the data type is float (single precision). Time columns and other miscellaneous columns are defined:
sddsplot
to make the best coice of time unit conversions
for time axis labeling.
Many time-related parameters are defined in the output file:
StartYear
-- Short parameter for the year when the file was started.
StartJulianDay
-- Short parameter for the day when the file was started.
StartMonth
-- Short parameter for the month when the file was started.
StartDayOfMonth
-- Short parameter for the day of month when the file was started.
StartHour
-- Short parameter for the hour when the file was started.
-generations[=digits=<integer>][,delimiter=<string>]
--
The output is sent to the file <SDDSoutputfile>-<N>
, where <N>
is
the smallest positive integer such that the file does not already
exist. By default, four digits are used for formating <N>
, so that
the first generation number is 0001.
-singleShot[=noprompt]
-- a single read is prompted at the terminal
and initiated by a <cr>
key press. The time interval is disabled.
With noprompt
present, no prompt is written to the terminal, but a <cr>
is still expected. Typing ``q'' or ``Q'' terminates the monitoring.
-conditions=<filename>,{allMustPass | oneMustPass}[,touchOutput][,retakeStep]
--
Names an SDDS file containing PVs to read and limits on each PV that must
be satisfied for data to be taken and logged. The file is like the main
input file, but has numerical columns LowerLimit and UpperLimit.
One of allMustPass
or oneMustPass
must be specified. It would make sense
to use allMustPass
in most monitoring applications.
If touchOutput
is present, then the output file is touched, even if no data
is written. This way, one can determine by the time stamp of the file
whether the monitoring job is still alive
when the conditions fail for a long period of time. If retakeStep
is
present, then the value of Step
in the output file is not
incremented until the conditions pass, and data is written to the output file.