sddsglitchlogger
reads values of process variables and writes them to a file at a specified time interval when a trigger occurrs.
An input file defines the process variables to be monitored and/or the trigger parameters.
An trigger file defines the the process variables that act as triggers.
sddsglitchlogger SRvac.mon . -time=24,hours -interval=1,minute``.'' specifies the directory of the outputfile is current directory,the file name is generated as related to the date. where the contents of the file
SRvac.mon
are
SDDS1 ¶meter name=TriggerControlName type=string &end ¶meter name=MajorAlarm type=short &end ¶meter name=MinorAlarm, type=short &end ¶meter name=NoAlarm type=short &end ¶meter name=OutputRootname type=string &end &column name=ControlName type=string &end &column name=ReadbackName type=string &end &column name=ReadbackUnits type=string &end &data mode=ascii no_row_counts=1 &end !page 1 soliday:PM1:X:positionM 0 0 1 PM soliday:PM1:X:positionM soliday:PM1:X:positionM mm soliday:PM1:Y:positionM soliday:PM1:Y:positionM mm soliday:PM2:X:positionM soliday:PM2:X:positionM mm ...
usage: sddsglitchlogger <input> <outputDirectory>|<outputRootname> [-triggerFile=<filename>] [-sampleInterval=<secs>] [-time=<real-value>[,<time-units>] [-circularBuffer=[before=<number>,][after=<number>]] [-holdoffTime=<seconds>] [-autoHoldoff] [-inhibitPV=name=<name>[,pendIOTime=<seconds>][,waitTime=<seconds>]] [-conditions=<filename>,{allMustPass | oneMustPass}] [-verbose] [-watchInput] [-lockFile=<filename>[,verbose]] 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 trigger file is an SDDS file with following columns, the meaning of these columns are the same as the parameters defined in input file, which are replaced by a trigger file:
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.
If trigger file is not given, the output file name is: outputDirectory/OutputRootname-string here, there may be many output files depends how many pages and how many different OutputRootnames the input file has. If trigger file is given, the outputDirectory given in command line is actually the OutputRootname, the output file name is now (only one output in this case): outputDirectory-string In above, both string is generated by MakeDailyGenerationFilename().
The output file contains one data column for each process variables named in the input file. 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.
-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.