/System ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Creating the /System tree ==
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/reference/reference/odb_keys/#system /System] on the ODB keys page for the new documentation about the /System ODB keys.
The <span style="color: purple;">''/System''</span> ODB tree is created automatically when the [[odbedit #Creating the ODB|ODB is first created]].
 
== Purpose ==
The <span style="color: purple;">''/System''</span> ODB tree contains information
specific to each "MIDAS client" currently connected to the experiment. The sequence number appears in the ODB under the <span style="color: purple;">''/System/Clients''</span> subtrees.
 
== Example ==
 
The following example shows a typical <span style="color: purple;">''/System''</span> ODB tree obtained using the
[[odbedit]] ls command.
 
[local:midas:S]/System>ls -lr
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
System                          DIR
    Clients                    DIR
        11781                  DIR
            Name                STRING  1    32    1h  0  R    ODBEdit
            Host                STRING  1    256  1h  0  R    dasdevpc2.triumf.ca
            Hardware type      INT    1    4    1h  0  R    44
            Server Port        INT    1    4    1h  0  R    55904
    Tmp                        DIR
    Client Notify              INT    1    4    1h  0  RWD  0
    Prompt                      STRING  1    256  10h  0  RWD  [%h:%e:%s]%p>
 
 
== Keys in <span style="color: purple;">''/System''</span> tree==
 
The keys in the ODB <span style="color: purple;">''/System tree''</span>
are described in the following sections.
 
=== <span style="color: purple;">''/System/Tmp''</span> subtree ===
 
<br>
--------
<br>
 
=== <span style="color: purple;">''/System/Client Notify''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
 
<br>
--------
<br>
 
=== <span style="color: purple;">''/System/Prompt''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "[%h:%e:%s]%p>"
</div>
 
This key controls the format of the prompt of the [[odbedit]] utility. The default prompt is
shown below
 
odbedit
[local:midas:S]/>
 
The meanings of the prompt symbols are
%h Host name
%e Experiment name
%s Run state symbol (U,S,P,R i.e. unknown, stopped, paused, running)
%p Current ODB path
%t Current time
 
==== Changing the odbedit prompt ====
 
To set the [[odbedit]] prompt to show the long-form of the run state :
 
  [local:midas:S]/System>set Prompt "[%h:%e:%S]%p>"
  [local:midas:Stopped]/System>
 
To set the prompt to the word "yes" :
 
    [local:midas:Stopped]/System>set Prompt yes>
    yes>
 
To set the prompt to name the fields (i.e. Host, Expt, State, Path):
 
    yes>set Prompt [Host:%h-Expt:%e:State:%s]Path:%p>
    [Host:local-Expt:midas-State:S]Path:/System>
 
To set the prompt to the current time:
 
    [Host:local-Expt:midas-State:S]Path:/System>set Prompt "%t>"
    13:29:08>
 
 
<br>
--------
<br>
 
 
=== <span style="color: purple;">''/System/Clients''</span> subtree ===
Each client is listed in this subtree under a <client number> subtree.
The <span style="color: purple;">''/System/Clients''</span> subtree reflects the system at a given time.
 
==== Example ====
The following example is of the <span style="color: purple;">''/System/Clients''</span> subtree.
More information has been added in  <span style="color:green;"> green</span>.
 
[local:midas:S]Clients>ls -lr
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Clients                        DIR
    1832                        DIR  <span style="color:green;">  <------------ Frontend 1</span>
        Name                    STRING  1    32    21h  0  R    ebfe01
        Host                    STRING  1    256  21h  0  R    pierre2
        Hardware type          INT    1    4    21h  0  R    42
        Server Port            INT    1    4    21h  0  R    2582
        Transition START        INT    1    4    21h  0  R    500
        Transition STOP        INT    1    4    21h  0  R    500
        Transition PAUSE        INT    1    4    21h  0  R    500
        Transition RESUME      INT    1    4    21h  0  R    500
        RPC                    DIR
            17000              BOOL    1    4    21h  0  R    y
    3872                        DIR  <span style="color:green;">  <------------ Frontend 2 </span>
        Name                    STRING  1    32    21h  0  R    ebfe02
        Host                    STRING  1    256  21h  0  R    pierre2
        Hardware type          INT    1    4    21h  0  R    42
        Server Port            INT    1    4    21h  0  R    2585
        Transition START        INT    1    4    21h  0  R    500
        Transition STOP        INT    1    4    21h  0  R    500
        Transition PAUSE        INT    1    4    21h  0  R    500
        Transition RESUME      INT    1    4    21h  0  R    500
        RPC                    DIR
            17000              BOOL    1    4    21h  0  R    y
    2220                        DIR  <span style="color:green;">  <------------ ODBedit doesn't need transition</span>
        Name                    STRING  1    32    42s  0  R    ODBEdit
        Host                    STRING  1    256  42s  0  R    pierre2
        Hardware type          INT    1    4    42s  0  R    42
        Server Port            INT    1    4    42s  0  R    3429
    568                        DIR  <span style="color:green;">  <------------ Event Builder</span>
        Name                    STRING  1    32    26s  0  R    Ebuilder
        Host                    STRING  1    256  26s  0  R    pierre2
        Hardware type          INT    1    4    26s  0  R    42
        Server Port            INT    1    4    26s  0  R    3432
        Transition START        INT    1    4    26s  0  R    300
        Transition STOP        INT    1    4    26s  0  R    700
    2848                        DIR  <span style="color:green;">  <------------ Logger</span>
        Name                    STRING  1    32    5s  0  R    Logger
        Host                    STRING  1    256  5s  0  R    pierre2
        Hardware type          INT    1    4    5s  0  R    42
        Server Port            INT    1    4    5s  0  R    3436
        Transition START        INT    1    4    5s  0  R    200
        Transition STOP        INT    1    4    5s  0  R    800
        Transition PAUSE        INT    1    4    5s  0  R    500
        Transition RESUME      INT    1    4    5s  0  R    500
        RPC                    DIR
            14000              BOOL    1    4    5s  0  R    y
 
=== Keys in the <span style="color: purple;">''/System/Clients/<client number> subtree''</span> ===
==== <span style="color: purple;">''/System/Clients/<client number>/Name''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
Client name
 
<br>
--------
<br>
 
==== <span style="color: purple;">''/System/Clients/<client number>/Host''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
This key reflect the
[[Common Parameters to MIDAS Utilities #Midas host |Midas host name]] on which this client is running.
 
 
<br>
--------
<br>
 
==== <span style="color: purple;">''/System/Clients/<client number>/Hardware type''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:''' 
</div>
 
 
<br>
--------
<br>
 
==== <span style="color: purple;">''/System/Clients/<client number>/Server Port''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:''' 
</div>
 
<br>
--------
<br>
 
 
==== <span style="color: purple;">''/System/Clients/<client number>/Transition START''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:''' 500  (depends on client)
</div>
[[Run States and Transitions#Default Transition Sequence Numbers |Client sequence number]] for  [[Run States and Transitions |Start Transition]].
 
If a permanent change of a client sequence number is required, the MIDAS system call
''cm_set_transition_sequence()'' can be used.
 
<br>
--------
<br>
 
==== <span style="color: purple;">''/System/Clients/<client number>/Transition STOP''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  500  (depends on client)
</div>
[[Run States and Transitions#Default Transition Sequence Numbers |Client sequence number]] for [[Run States and Transitions |Stop Transition]].
 
If a permanent change of a client sequence number is required, the MIDAS system call
''cm_set_transition_sequence()'' can be used.
 
<br>
--------
<br>
 
==== <span style="color: purple;">''/System/Clients/<client number>/Transition PAUSE''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  500  (depends on client)
</div>
Client sequence number for Pause [[transition]].
If a permanent change of a client sequence number is required, the MIDAS system call
[[cm_set_transition_sequence() ]] can be used.
 
<br>
--------
<br>
 
 
==== <span style="color: purple;">''/System/Clients/<client number>/Transition RESUME''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  500  (depends on client)
</div>
Client sequence number for Resume [[transition]].
If a permanent change of a client sequence number is required, the MIDAS system call
[[cm_set_transition_sequence() ]] can be used.
 
<br>
--------
<br>
 
=== Keys in the <span style="color: purple;">''/System/Clients/<client number>/RPC subtree''</span> ===

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See /System on the ODB keys page for the new documentation about the /System ODB keys.