sddsvmonitor
reads values of process variables and writes them to a file at a specified time interval.
This command differs from sddsmonitor
in that the monitored
process variables names are specified in two lists. The first list
gives PV ``rootnames''. The second list gives suffixes to apply to
each of the rootnames. For each readback step, a page is written to
the output file with the PV rootnames appearing in one column, and the
process variable values in separate data columns for each suffix.
Warning: If the readback values of all of the vector PVs do not change, then no data sets are written to the output file. This skipping of duplicate values is intended to keep the size of the output file as small as possible. The scalar PVs are not checked for changes though. In the future an option that allows logging of duplicate vector PVs may be implemented.
sddsvmonitor SRvac.vmon SRvac.vsdds -time=24,hours -interval=1,minutewhere the contents of the file
SRvac.vmon
are
SDDS1 ¶meter name=ListType, type=string &end &column name = "ListData", type = "string", &end &data mode = "ascii", no_row_counts=1 &end Rootnames VM:01: VM:02: VM:03: ... VM:40: Suffixes VGC1.PRESThere is only one element in the suffix list of this example. The output file will contain columns
Rootnames
and VGC1.PRES
.
usage: sddsvmonitor {<inputfile> | -rootnames=<file> -suffixes=<file>] [-scalars=<filename>] <outputfile> [{-erase | -append | -generations[=digits=<integer>][,delimiter=<string>}] [-conditions=<filename>,{allMustPass | oneMustPass}[,touchOutput][,retakeStep]] [-steps=<integer> | -time=<value>[,<units>]] [-interval=<value>[,<units>]] [-verbose] [-singleShot[=noprompt]] [-precision={single | double}] [-onCAerror={useZero | skipPage | exit}] [-PVlist=<filename>] [-noEzca [-pendIOtime=<value>]] [-ezcaTime=<timeout>,<retries>] [-logDuplicates[=countThreshold=<number>]] [-comment=<parameterName>,<text>] Writes values of process variables to a binary SDDS file.
The input file is an SDDS file with one data column and one parameter:
rootnames
'' and ``suffixes
''.
An alternative to specifying the rootnames and suffixes with the above input file is
to specify the list of rootnames and suffixes with two separate files, as shown in the usage message
above.
The string data in rootname file must be in column Rootname
. The string data in suffix file
must be in column Suffix
.
An optional input file for scalar PVs (i.e. regular PVs) can be specified. The required columns are:
The conditions file is an optional input specified on the command line which lists conditions that must be satisfied at each time steps 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 situations 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 suffix named in the input file. By default, the data type is float (single precision). Other columns are:
sddsplot
to make the best coice of time unit conversions
for time axis labeling.
For each scalar PV defined in the scalars
command line option a parameter of type double is defined.
Many time-related parameters which don't change values throughout the file are defined:
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.
Rootnames
.
Suffixes
.
-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.
sddsvmonitor
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.
-logDuplicates[=countThreshold=<number>]
-- Specifies that data should be
logged even if it is exactly the same as the last data.
-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.