/System ODB tree

From MidasWiki
Revision as of 13:35, 10 June 2014 by Suz (talk | contribs)
Jump to navigation Jump to search

Creating the /System tree

The /System ODB tree is created automatically when the ODB is first created.

Purpose

The /System ODB tree contains information specific to each "MIDAS client" currently connected to the experiment. The sequence number appears in the ODB under the /System/Clients subtrees.

Example

The following example shows a typical /System 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 /System tree

The keys in the ODB /System tree are described in the following sections.

Tmp subtree

This subtree in the /System ODB tree is created and used by the system.



Client Notify

  • Type: INT
  • Default: 0

This key in the /System ODB tree is used by the system to inform other clients after deleting a client from the system.




Prompt

  • Type: STRING
  • Default: "[%h:%e:%s]%p>"

This key in the /System ODB tree 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>






Clients subtree

This subtree is in the /System ODB tree. Each client is listed in this subtree under a <client-number> subtree. The /System/Clients subtree reflects the system at a given time.

Example

The following example is of the /System/Clients subtree. More information has been added in green.

[local:midas:S]Clients>ls -lr
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Clients                         DIR
   1832                        DIR    <------------ Frontend 1
       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     <------------ Frontend 2 
       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     <------------ ODBedit doesn't need transition
       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     <------------ Event Builder
       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     <------------ Logger
       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 <client-number> subtree

This subtree is found in the Clients subtree. Each client that has run on the experiment is listed in a <client-number> subtree.




Name

  • Type: STRING
  • Default:

This key in the <client-number> subtree contains the client name.




Host

  • Type: STRING
  • Default:

This key in the <client-number> subtree contains the Midas host name on which this client is running.





Hardware type

  • Type: INT
  • Default:

This key in the <client-number> subtree is used by the system to contain a code that describes the hardware architecture of the host.



Server Port

  • Type: INT
  • Default:

This key in the <client-number> subtree is used by the system to contain the client's server port.




Transition START

  • Type: INT
  • Default: 500 (depends on client)

This key in the <client-number> subtree is used to contain the Client sequence number for Start Transition.

If a permanent change of a client sequence number is required, the MIDAS system call cm_set_transition_sequence() can be used.




Transition STOP

  • Type: INT
  • Default: 500 (depends on client)

This key in the <client-number> subtree is used to contain the Client sequence number for Stop Transition.

If a permanent change of a client sequence number is required, the MIDAS system call cm_set_transition_sequence() can be used.




Transition PAUSE

  • Type: INT
  • Default: 500 (depends on client)

This key in the <client-number> subtree is used to contain the 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.




Transition RESUME

  • Type: INT
  • Default: 500 (depends on client)

This key in the <client-number> subtree is used to contain the 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.