sddsmonitor
reads values of process variables and writes them to a file at a specified time interval.
An input file defines the process variables to be monitored.
sddsmonitor SRvac.mon SRvac.sdds -time=24,hours -interval=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: sddsmonitor <SDDSinputfile> <SDDSoutputfile> [-erase | -append[=recover] | -generations[=digits=<integer>][,delimiter=<string>]] [-steps=<integer-value> | -time=<real-value>[,<time-units>]] [-interval=<real-value>[,<time-units>]] [-updateinterval=<integer-value>] [-verbose] [-singleShot[=noprompt] [-precision={single|double}] [-oncaerror={usezero|skiprow|exit}] [-pendIOtime=<value>] [-ezcaTiming[=<timeout>,<retries>]] [-glitch=<controlname>[,message=<string>]{,delta=<value>|,fraction=<value>}\ [,before=<number>][,after=<number>][,baseline=<number>][,holdoff=<seconds>]] [-trigger=<controlName>,level=<value>[,message=<string>][,slope={+ | -}]\ [,before=<number>][,after=<number>][,holdoff=<seconds>][,autoArm]] [-conditions=<filename>,{allMustPass | oneMustPass}[,touchOutput][,retakeStep]] [-noezca] [-comment=<parameterName>,<text>] [-getUnits={force | ifBlank | ifNoneGiven}]\n\ Writes values of process variables or devices to a binary SDDS file.
The input file is an SDDS file 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 input file PVs are recorded.
When this situation occurs for a long period of time, the size of the output file doesn't
grow, 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 monitoring program to touch the output file at every step.
The output file contains one data column for each process variables named in the 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.
sddsmonitor
.
sddsmonitor
using the same
information in the input files. The recover
option allows an attempt
to recover the data using sddsconvert
if the input file is somehow corrupted.
-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.
<controlname>
) or
device changes by some value. If <controlname>
is a device, then the message
field
should be specified. A glitch is triggered if the control
variable changes by the values of the delta
or a fraction
field with respect to an exponential
average from baseline
number of readings.
The before
and after
fields give the number of readings recorded in a page
before and after the glitch is triggered. Some buffers may be joined in
one large page if the triggering events occur close together.
Option -oncaerror
is ignored.
level
with the given slope
. This is analogous to an oscilloscope
trigger.
-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.
-comment=<parameterName>,<text>
--
Gives the parameter name for a comment to be placed in the SDDS output file,
along with the text to be placed in the file.
[-getUnits={force | ifBlank | ifNoneGiven}]
--
Gets the units of quantities from EPICS. 'force' means ignore the ReadbackUnits
data in the input, if any. 'ifBlank' means attempt to get units for any quantity
that has a blank string given for units. 'ifNoneGiven' (default) means get units
for all quantities, but only if no ReadbackUnits column is given in the file.