Difference between revisions of "Module/System monitor"

From PaparazziUAV
Jump to navigation Jump to search
(slightly more details on the sys_mon report)
 
Line 2: Line 2:
The sys_mon module gives you some information about the timing of the periodic tasks and a rough estimate of cpu load (averaged over 1 sec).
The sys_mon module gives you some information about the timing of the periodic tasks and a rough estimate of cpu load (averaged over 1 sec).


The SYS_MON message contains the following information:
The SYS_MON message contains the following information ('''all times are given in microseconds'''):
; periodic_time :  time in us between two calls of the main periodic function (averaged over 1s)
; periodic_time :  time between two calls of the main periodic function (averaged over 1s)
; periodic_cycle : time in us it took to execute the main periodic functions (averaged over 1s)
; periodic_cycle : time it took to execute the main periodic functions (averaged over 1s)
; periodic_cycle_min : minimum time in us it took to execute the main periodic functions during the last second
; periodic_cycle_min : minimum time it took to execute the main periodic functions during the last second
; periodic_cycle_max : maximum time in us it took to execute the main periodic functions during the last second
; periodic_cycle_max : maximum time it took to execute the main periodic functions during the last second
; event_number : number of times the event loop was called during the last second
; event_number : number of times the event loop was called during the last second
; cpu_load : rough estimate of cpu load (averaged over 1 sec)
; cpu_load : rough estimate of cpu load (averaged over 1 sec)

Latest revision as of 09:25, 26 August 2013

The sys_mon module gives you some information about the timing of the periodic tasks and a rough estimate of cpu load (averaged over 1 sec).

The SYS_MON message contains the following information (all times are given in microseconds):

periodic_time
time between two calls of the main periodic function (averaged over 1s)
periodic_cycle
time it took to execute the main periodic functions (averaged over 1s)
periodic_cycle_min
minimum time it took to execute the main periodic functions during the last second
periodic_cycle_max
maximum time it took to execute the main periodic functions during the last second
event_number
number of times the event loop was called during the last second
cpu_load
rough estimate of cpu load (averaged over 1 sec)


So your periodic_time should be 1/PERIODIC_FREQUENCY. The periodic_cycle_max should not be over the periodic_time, otherwise in at least one cycle it took longer to calculate everything and the next one was slightly delayed.


The sys_mon module has to run at the full main frequency!

So either don't specify a main_freq parameter like in the example below or set your actual main frequency

To use it load the sys_mon module:

File: conf/airframes/myplane.xml
  <modules>
    ...
    <load name="sys_mon.xml"/>
  </modules>