/Runinfo ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "== Creating the /Runinfo tree == The <span style="color: purple;">''/Runinfo''</span> tree is created automatically when the ODB is first created...")
 
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Pagelinks}}
== Creating the /Runinfo tree ==
== Creating the /Runinfo tree ==
The <span style="color: purple;">''/Runinfo''</span> tree is created automatically when the [[odbedit #Creating the ODB|ODB is first created]].
The <span style="color: purple;">''/Runinfo''</span> tree is created automatically when the [[odbedit #Creating the ODB|ODB is first created]].
Line 5: Line 7:
The <span style="color: purple;">''/Runinfo''</span> ODB tree contains system information  
The <span style="color: purple;">''/Runinfo''</span> ODB tree contains system information  
about the state of the current run. Several time fields are available for run time statistics.  
about the state of the current run. Several time fields are available for run time statistics.  
This information is displayed on the [[mhttpd Main Status page]] or can be
This information is displayed on the {{Utility|name=mhttpd}} [[Status Page|Status page]] or can be
viewed with [[odbedit]] as shown below.
viewed with [[odbedit]] as shown [[#Example |below]].


== Example ==  
== Example ==  
Line 27: Line 29:
The keys in the ODB  <span style="color: purple;">''/Runinfo''</span> tree are described in the following sections.  
The keys in the ODB  <span style="color: purple;">''/Runinfo''</span> tree are described in the following sections.  


=== <span style="color: purple;">''/Runinfo/State''</span>  ===  
=== <span style="color: purple;">''State''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
* '''Default:'''  1
* '''Default:'''  1
</div>  
</div>  
Specifies the state of the current run (see [[Run States and Transitions #MIDAS State and Transition Codes]]) . The possible states are
This key in the [[#top|/Runinfo tree]]
specifies the state of the current run (see [[Run States and Transitions #MIDAS State and Transition Codes|MIDAS run states]]) . The possible states are
*    1: STOPPED ( STATE_STOPPED )
*    1: STOPPED ( STATE_STOPPED )
*    2: PAUSED ( STATE_PAUSED )
*    2: PAUSED ( STATE_PAUSED )
Line 42: Line 45:




=== <span style="color: purple;">''/Runinfo/Online Mode''</span>  ===  
=== <span style="color: purple;">''Online Mode''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
* '''Default:'''  1
* '''Default:'''  1
</div>  
</div>  
 
This key in the [[#top|/Runinfo tree]]
Specifies the expected acquisition mode. This parameter allows the user to detect if the data are coming from a "real-time" hardware source (the default) or from a data save-set. Note that for analysis replay using "analyzer" this flag will be switched off.  
specifies the expected acquisition mode. This parameter allows the user to detect if the data are coming from a "real-time" hardware source (the default) or from a data save-set. Note that for analysis replay using "analyzer", this flag will be switched off.  


<br>
<br>
Line 55: Line 58:




=== <span style="color: purple;">''/Runinfo/Run number''</span>  ===  
=== <span style="color: purple;">''Run number''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
* '''Default:'''  0
* '''Default:'''  0
</div>  
</div>  
 
This key in the [[#top|/Runinfo tree]]
Specifies the current run number. This number is automatically incremented by a successful run start procedure.  
specifies the current run number. This number is automatically incremented by a successful run start procedure.  


<br>
<br>
Line 67: Line 70:
<br>
<br>


=== <span style="color: purple;">''/Runinfo/Transition in progress''</span>  ===  
=== <span style="color: purple;">''Transition in progress''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
* '''Default:'''  0
* '''Default:'''  0
</div>  
</div>  
Specifies the current internal state of the system. This parameter is used for multiple source of "run start" synchronization. Sometimes when run start or stop fails, <span style="color: purple;">''Transition in progress''</span>  is left set to 1, and must be manually set to 0 by the user before the run start/stop can be
This key in the [[#top|/Runinfo tree]]
retried.
specifies the current internal state of the system. This parameter is used for multiple source of "run start" synchronization. Sometimes when run start or stop fails, <span style="color: purple;">''Transition in progress''</span>  is left set to 1, and must be manually set to 0 by the user (e.g. with [[odbedit]]) before the run start/stop command can be retried.
   > odb set /runinfo/transition in progress 0
   > odb set "/runinfo/transition in progress" 0




Line 81: Line 84:
<br>
<br>


=== <span style="color: purple;">''/Runinfo/Requested transition''</span>  ===  
 
=== <span style="color: purple;">''Start abort''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
* '''Default:'''  1
* '''Default:'''  0
</div>  
</div>  


Specifies the current internal state of the [[Deferred Transition]] state of the system.  
This key in the [[#top|/Runinfo tree]] will be set if run start is aborted. The run start may be aborted if
the saved data file already exists, or on alarm (see [[/Experiment ODB tree#Prevent start on alarms|prevent start on alarm]]) , or if a
[[/Experiment ODB tree#Prevent start on required progs| required program]] is not running.
<br>
<br>
--------
--------
<br>
<br>


=== <span style="color: purple;">''/Runinfo/''</span>  ===  
=== <span style="color: purple;">''Requested transition''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
* '''Default:'''  1
* '''Default:'''  0
</div>  
</div>  


 
This key in the [[#top|/Runinfo tree]]
specifies whether a transition has been requested. It will be set if a [[Run States and Transitions #Deferred Transitions|deferred transition]] is in progress.
<br>
<br>
--------
--------
<br>
<br>


=== <span style="color: purple;">''/Runinfo/''</span>  ===  
=== <span style="color: purple;">''Start time''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' STRING
* '''Default:'''  1
* '''Default:'''  "Tue Sep 09 15:04:42 1997"
</div>  
</div>  
 
This key in the [[#top|/Runinfo tree]]
specifies in an ASCII format the time at which the last run has been started.


<br>
<br>
Line 114: Line 122:
<br>
<br>


=== <span style="color: purple;">''/Runinfo/''</span>  ===  
=== <span style="color: purple;">''Start time binary''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' DWORD
* '''Default:'''  1
* '''Default:'''  0
</div>  
</div>  
 
This key in the [[#top|/Runinfo tree]]
 
specifies in a binary format the time at which the last run has been started. This field is useful for time interval computation.
<br>
<br>
--------
--------
<br>
<br>


=== <span style="color: purple;">''/Runinfo/''</span>  ===  
=== <span style="color: purple;">''Stop time''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' STRING
* '''Default:'''  1
* '''Default:'''  "Tue Sep 09 15:04:42 1997"
</div>  
</div>  
 
This key in the [[#top|/Runinfo tree]]
 
specifies in an ASCII format the time at which the last run was stopped.
<br>
<br>
--------
--------
Line 137: Line 145:




=== <span style="color: purple;">''/Runinfo/''</span>  ===  
=== <span style="color: purple;">''Stop time binary''</span>  ===  
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' DWORD
* '''Default:'''  1
* '''Default:'''  0
</div>  
</div>  
This key in the [[#top|/Runinfo tree]]
specifies in a binary format the time at which the last run has been stopped. This field is useful for time interval computation.


 
[[Category:ODB Tree]]
<br>
--------
<br>
 
=== <span style="color: purple;">''/Runinfo/''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  1
</div>
 
 
<br>
--------
<br>

Latest revision as of 13:17, 25 November 2016


Creating the /Runinfo tree

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

Purpose

The /Runinfo ODB tree contains system information about the state of the current run. Several time fields are available for run time statistics. This information is displayed on the mhttpd Status page or can be viewed with odbedit as shown below.

Example

> odb -e expt -h host
[host:expt:Running]/>ls -r -l /runinfo
Key name                      Type    #Val  Size  Last Opn Mode Value
------------------------------------------------------------------------
Runinfo                        DIR
   State                      INT     1     4     2h   0   RWD  3
   Online Mode                INT     1     4     2h   0   RWD  1
   Run number                 INT     1     4     2h   0   RWD  8521
   Transition in progress     INT     1     4     2h   0   RWD  0
   Requested transition       INT     1     4     2h   0   RWD  0
   Start time                 STRING  1     32    2h   0   RWD  Thu Mar 23 10:03:44 2000
   Start time binary          DWORD   1     4     2h   0   RWD  953834624
   Stop time                  STRING  1     32    2h   0   RWD  Thu Mar 23 10:03:33 2000
   Stop time binary           DWORD   1     4     2h   0   RWD  0

Keys in the /Runinfo tree

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

State

  • Type: INT
  • Default: 1

This key in the /Runinfo tree specifies the state of the current run (see MIDAS run states) . The possible states are

  • 1: STOPPED ( STATE_STOPPED )
  • 2: PAUSED ( STATE_PAUSED )
  • 3: RUNNING ( STATE_RUNNING )





Online Mode

  • Type: INT
  • Default: 1

This key in the /Runinfo tree specifies the expected acquisition mode. This parameter allows the user to detect if the data are coming from a "real-time" hardware source (the default) or from a data save-set. Note that for analysis replay using "analyzer", this flag will be switched off.





Run number

  • Type: INT
  • Default: 0

This key in the /Runinfo tree specifies the current run number. This number is automatically incremented by a successful run start procedure.




Transition in progress

  • Type: INT
  • Default: 0

This key in the /Runinfo tree specifies the current internal state of the system. This parameter is used for multiple source of "run start" synchronization. Sometimes when run start or stop fails, Transition in progress is left set to 1, and must be manually set to 0 by the user (e.g. with odbedit) before the run start/stop command can be retried.

 > odb set "/runinfo/transition in progress" 0






Start abort

  • Type: INT
  • Default: 0

This key in the /Runinfo tree will be set if run start is aborted. The run start may be aborted if the saved data file already exists, or on alarm (see prevent start on alarm) , or if a required program is not running.



Requested transition

  • Type: INT
  • Default: 0

This key in the /Runinfo tree specifies whether a transition has been requested. It will be set if a deferred transition is in progress.



Start time

  • Type: STRING
  • Default: "Tue Sep 09 15:04:42 1997"

This key in the /Runinfo tree specifies in an ASCII format the time at which the last run has been started.




Start time binary

  • Type: DWORD
  • Default: 0

This key in the /Runinfo tree specifies in a binary format the time at which the last run has been started. This field is useful for time interval computation.



Stop time

  • Type: STRING
  • Default: "Tue Sep 09 15:04:42 1997"

This key in the /Runinfo tree specifies in an ASCII format the time at which the last run was stopped.




Stop time binary

  • Type: DWORD
  • Default: 0

This key in the /Runinfo tree specifies in a binary format the time at which the last run has been stopped. This field is useful for time interval computation.