Command-line options ==================== The drasi system consist of a small set of executables, controlled by various command-line options. It is a general goal to keep the amount of needed options to a minimum, thanks to the system employing sane defaults and heuristics for most configurable parameters. Common options -------------- .. option:: --gdb Run in GDB (must be the first argument). (This is actually performed by a wrapper script.) .. option:: --help Show help message. .. option:: --xxx=help Show detailed help message for options that take suboptions. Options for main data-pump -------------------------- The readout and merger is to a large extent the same program, and thus share many options. .. option:: --port=[+]PORT Network TCP/IP port to bind to. Default is 56583. With the `+N`, N is added to the default port number. This is useful for running multiple instances on the same machine. .. option:: --server=[drasi|trans[:PORT]][,[no]hold][,forcemap][,clients=N][,bufsize=N][,dest=HOST] Network data server (output). Note that a data server can be started at any node, but would usually be at the final event builder or time sorter. .. option:: drasi Native protocol data server [hold]. .. option:: trans[:PORT] Transport protocol data server [weakhold]. .. option:: stream[:PORT] Stream protocol data server [nohold]. .. option:: hold|nohold All data must be sent to one client. (No data is discarded due to slow clients.) .. option:: weakhold All data must be sent when some client connected. .. option:: spilldelay|nospilldelay Force delayed data transmission off/on. (Default is on when only one CPU core available.) .. option:: flush=N Flush data every N seconds. .. option:: forcemap Only allow transport data connections through portmapped port. (Does not work with legacy clients.) .. option:: clients=N Serve data to (at most) N clients (default 1). .. option:: bufsize=N Deliver data in LMD buffers of size N (Mi|raw hex). .. option:: dest=HOST Allowed destinations using the drasi protocol. .. option:: readout Use readout/merge buffer as source. (Matters if a filter stage is in use.) .. option:: filter Use filter buffer as source (only when available). .. option:: final Use filter buffer as source (when available, otherwise readout buffer). (This is the default.) .. This is not properly implemented yet... .. .. .. option:: ts-filter .. .. Use buffer of timestamps as source. .. The following option is intentionally not shown documented here: .. It should only be used for development purposes. .. .. .. option:: --log-no-start-wait .. .. Do not wait for log client to connect. (Do not use!) .. option:: --log-ack-wait For each log message, wait for acknowlegde of receipt from the log client before proceeding. This can be used to debug hard lock-ups in readout code, since the readout will not proceed before each message has been successfuly sent over the network. .. option:: --log-no-rate-limit Do not rate-limit log messages. .. option:: --file-writer File writer thread. Note that a file writer can be started at any node, but would usually be at the final event builder or time sorter. .. option:: bufsize=N Deliver data in LMD buffers of size N (Mi|raw hex). .. option:: output=FILENAME Destination LMD file at start. (Useful for testing.) .. option:: max-events=N Close initial LMD file after N events written. .. option:: terminate-on-close Terminate entire program after closing LMD file. (Useful for testing.) .. option:: --buf=[size=N][,direct|physmmap|physpexor@off] Size of data buffer (Mi|raw hex). .. option:: size=N Size of buffer. .. option:: nohint Do not warn/hint about small buffer size. .. option:: valloc Aligned memory allocation (using ``valloc()``, for systems where this is useful). .. option:: direct@OFF Direct mapping memory offset. .. option:: physmmap@OFF Physical mapping memory offset. .. option:: physpexor@OFF Physical mapping memory offset (via `PEXOR` driver). .. option:: input=N|frac|% Size or fraction to use for merge input buffers (default 75%). .. option:: filter=N|frac|% Size or fraction to use for (optional) filter output buffer (default 50%). The fraction excludes input buffers. .. option:: --max-ev-size=N Maximum event size (default 0x1000). .. option:: --max-ev-interval=Ns Specify the maximum time between events. Specifying this options implies a promise to at least deliver some periodic 'keep-alive' event (e.g. a synchronisation trigger) every so often. Warnings will be printed when this promise is not fulfilled. This is required for any data that eventually goes to a timesorter which uses the :option:`ts-disable` option, see :ref:`this `. .. option:: --[triva|trimi|trixor]=(master|slave),[@0xADDR][,ctime=n][,fctime=n][,spill1213] Trigger module, being either a ``triva``, ``trimi`` or ``trixor`` module. .. option:: master Operate as trigger bus / deadtime domain master. .. option:: slave Operate as trigger bus / deadtime domain slave. .. option:: @0xADDR Physical address (bits 31-24 on VME bus) of trigger module. .. option:: ctime=N Conversion time (in 100 ns units). .. option:: fctime=N Fast clear time (in 100 ns units). .. option:: spill1213 Spill on/off marked by trigger 12/13 for delayed EB. .. option:: sim=MOD[@HOST] Simulated trigger bus. .. option:: multi-word-trig-clear Do deadtime/trigger clear using multiple word writes. .. option:: --inspill-stuck-timeout=Ns Timeout to regard inspill status as stuck. Delayed event-building will not hold data transport when status is stuck. .. option:: --master=HOST[:[+]PORT] TRIVA/MI master instance. Used when *this instance* is a slave. .. option:: --slave=HOST[:[+]PORT] TRIVA/MI slave instance. Used (multiple times) when *this instance* is master. .. option:: --eb-master=HOST[:[+]PORT] Event builder master instance (=TRIVA/MI master). Used when *this instance* is an event builder. .. option:: --eb=host[:[+]PORT] Event builder (actual) instance. Used when *this instance* is a master. .. option:: --label=STRING Use the given label for the :ref:`tree view monitor `. .. option:: --ntp=HOST NTP server (use when local clock has sloppy discipline). The received times are only used for monitoring of timestamps. .. option:: --no-filter Disable filter stage (if compiled in). .. option:: --[action|info|log|debug|spam] Minimum severity of messages to print on console (default is info). .. option:: --debug=MASK Enable debug messages. .. option:: --insomniac Disable debugger sleep. Options for readout ~~~~~~~~~~~~~~~~~~~ Additional options for (f_user-based) readout: .. option:: --max-sticky-size=N Maximum sticky (after) event size (def 0x1000). .. option:: --max-sticky-before-size=N Maximum sticky (before) event size (def 0x100). .. option:: --subev=[opts] LMD subevent/crate readout specs. .. option:: subcrate=N Subevent subcrate number [0-15] (or crate). .. option:: type=N Subevent type [0-65535] (or t). .. option:: subtype=N Subevent subtype [0-65535] (or st). .. option:: procid=N Subevent procid [0-65535] (or proc). .. option:: control=N Subevent control [0-255] (or ctrl). Options for merger / time-sorter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Input and control options for merger: .. option:: --drasi=[bufsize=N,]HOST[:[+]PORT] Network data source (native protocol). .. option:: inbufsize=N Size of buffer to use for incoming data (Mi|raw hex|frac|%%). The buffer allowance is taken from the main data buffer, and can also be specified as a fraction of that. .. option:: max-ev-size=N Give maximum event length smaller than automatically determined. Will be checked for each event. .. option:: ts-disable=N Time to wait (seconds) until this time sorter source is disabled due to no data. Default is 0, no automatic disable. .. Caution:: This option can cause data to be sorted out-of-order if sources are misbehaving. Do not use this option unless the :ref:`implications ` are clear. .. option:: keepalive=Ns Time to wait (seconds) until this time sorter source is reconnected due to no data. .. option:: HOST[:PORT] The actual data source. .. option:: --trans=[bufsize=N,]HOST[:PORT] Network data source (MBS transport protocol). The same options as for :option:`--drasi` are available. In addition: .. option:: label=STRING Use the given label for the :ref:`tree view monitor `. .. option:: --file= Read data from file (useful for filter testing). .. option:: --merge-mode=(wr|titris|event) Merge mode: .. option:: event Do event-building. Events from multiple sources are merged. Events must have matching event and trigger numbers. .. option:: wr Time sort using white rabbit-formatted timestamps. .. option:: titris Time sort using titris-formatted timestamps. .. option:: --merge-no-validate Do not validate sources. (Disables reconnects.) (Use only for testing!) .. option:: --merge-ts-disable=N Time to wait (seconds) until time sorter complains about sources with no data. .. Caution:: This option can cause data to be sorted out-of-order if sources are misbehaving. Do not use this option unless the :ref:`implications ` are clear. .. option:: --merge-ts-wr-check Check that White Rabbit (WR) timestamps are reasonable compared to the local PC time. Timestamps more than 5 s into the future and timestamps older than 10 times the missing timestamp disable timeout are considered as faulty and sorted as if they were 0. (The values in the data are not modified.) .. Caution:: This option can cause data to be sorted out-of-order if sources are misbehaving. Do not use this option unless the :ref:`implications ` are clear. .. option:: --merge-keepalive=N Time to wait (seconds) until time sorter sources are reconnected due to no data. (Default is 30 s.) .. option:: --merge-ts-analyse-ref=N Use time-stamp ID N a reference for online time-stamp alignment analysis. .. option:: --merge-ts-analyse-sync-trig=N Trigger number for sync triggers used for online time-stamp alignment analysis. .. option:: --merge-ts-analyse-sync-trig-id=ID:N Trigger number for sync triggers used for online time-stamp alignment analysis for data from timestamp white rabbit ID. Options for monitor: `lwrocmon` ------------------------------- .. option:: HOST[:PORT] Drasi instance(s) to monitor. .. option:: --rate[=N] Show rate for given systems (every N s). .. option:: --tree Show ncurses :ref:`tree view ` of systems. .. option:: --no-down-up Do not search up in tree after destinations. .. option:: --no-ts-analysis Do not show timestamp analysis in tree view. .. option:: --no-lookup Do not do hostname lookup. .. option:: --raw-ts Show raw timestamp values. .. option:: --buf-size Show buffer sizes instead of fill ratios. .. option:: --detail Show ncurses detailed system status. .. option:: --monbuf Dump raw monitor buffer data. .. option:: --count=N Quit after showing N reports (only --rate). .. option:: --influxdb Produce entries for InfluxDB line protocol (requires --rate). .. option:: --expire-time=N Expire stale data (lost connection) after N s. .. option:: --nz-rate-success Exit status 0 if event increase seen (only --rate). .. option:: --dt-trace Store deadtime trace files (requires --tree). .. option:: --log[=FILENAME] Record log messages from systems. Default filename `lwlog.l`. .. option:: --raw Show raw values. .. _lwroclog_cmdline: Options for log pretty-printer: `lwroclog` ------------------------------------------ .. option:: --info|--log|--debug|--spam Minimum severity of messages to show. .. option:: --us Show fractional time (us) of log messages. .. option:: --file Show source location of log message. .. option:: --full Show all log fields. .. option:: --colour=yes|no Force use of coloured output. .. _lwrocctrl_cmdline: Options for control: `lwrocctrl` -------------------------------- Control commands beginning with ``--file-`` are issued to a file writer node, usually an event builder or time sorter. Control commands beginning with ``--acq-`` are issued to the master node of a dead-time domain. .. option:: HOSTNAME[:PORT] Drasi instance to control. .. option:: --file-open [=[auto=SIZE,]NAME] Open a new file. .. option:: auto=SIZE Open a new file after SIZE bytes written. Automatic file names will increment the last number in the filename. If none exist, a number will be added. .. option:: time=Ns Open a new file after a given time. Automatic file names as above. .. option:: events=N Open a new file after a given number of events have been written. Atomatic file names as above. .. option:: NAME Name of file. .. option:: --file-new[=[auto=SIZE,]NAME] Continue recording of data to a new file, with no events lost in-between. Opens file is closed. The same options as for :option:`--file-open` are available. .. option:: --file-close Close current file. .. option:: --file-hold Hold data for file collection. .. option:: --file-unjam Close file with write failure (sets hold). .. option:: --file-status Report file writing status. .. option:: --acq-start Start acq (trigger 14). .. option:: --acq-stop Stop acq (trigger 15), and/or hold. .. option:: --acq-status Report acq status. .. option:: --acq-meas-dt Do live dead-time accounting for systems within a dead-time domain. Results (in microseconds) are shown in the tree view monitor. .. option:: --merge-try-reconnect Request merger to reconnect disabled sources. .. option:: --debug[=NUM|0xMASK] Enable / disable (0) debug messages.