GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MON / V0-3-0
Constituent: mon     Tag: sun-gcc
#include "MON/MON_msgs.h"
#include "MON/MON_pubdefs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/INT.ih"
#include "PBS/MBA.h"
#include "PBS/TASK.h"
#include "MON_idle.h"
Include dependency graph for MON_idle.c:
Functions | |
unsigned int | MON_idle_init (MON_Idle_Control *ctl_p, unsigned int dog_seconds, unsigned int dog_cpu_msecs) |
Initialize the IDLE monitor. | |
unsigned int | MON_idle_shutdown (MON_Idle_Control *ctl_p) |
Shutdown the IDLE monitor. | |
void | MON_idle_set_watchdog (MON_Idle_Control *ctl_p) |
Set the hardware watchdog timer. | |
static unsigned int | mon_idle_loop (MON_Idle_Control *ctl_p, int run_once) |
Idly consume CPU cycles in a loop. | |
static void * | mon_idle_task (TASK_parameter parm) |
Consume unused CPU cycles. | |
unsigned int | MON_idle_start (MON_Idle_Control *ctl_p, TASK_attr *attr_p) |
Start the IDLE monitor functions. | |
unsigned int | MON_idle_stop (MON_Idle_Control *ctl_p) |
Stop the IDLE monitor functions. | |
unsigned int | MON_idle_update_history (MON_Idle_Control *ctl_p) |
Update the IDLE time history. | |
static int | mon_idle_get_load (MON_Idle_Control *ctl_p, unsigned int first_index, unsigned int last_index) |
Get CPU loading between two IDLE time history samples. | |
unsigned int | MON_idle_get_stats (MON_Idle_Control *ctl_p, MON_Load_Stats *load_p) |
Get CPU loading statistics. |
** CVS $Id: MON_idle.c,v 1.6 2005/08/11 16:55:15 dmay Exp $ **
Monitors the loading and idle time of the CPU. Starts an IDLE task that spins in a loop and reports a running total of the number of loop iterations that it completes. By setting the priority of this IDLE task to the lowest value possible, it will only run when the CPU is idle.
When first started, the IDLE task measures and records the number of time base register cycles required to execute its inner spin-loop with interrupts disabled. This value is then used as the benchmark for the amount of time required to execute the IDLE loop when the CPU is completely unloaded. At periodic intervals, the loop completion count is used to determine how many time base register cycles were spent executing the IDLE loop during the previous interval. By dividing this value by the total number of time base register cycles in the previous interval, a CPU loading/idle-time metric is produced.
|
Get CPU loading between two IDLE time history samples.
|
|
Get CPU loading statistics.
|
|
Initialize the IDLE monitor.
|
|
Idly consume CPU cycles in a loop.
|
|
Set the hardware watchdog timer.
|
|
Shutdown the IDLE monitor.
|
|
Start the IDLE monitor functions.
|
|
Stop the IDLE monitor functions.
|
|
Consume unused CPU cycles.
|
|
Update the IDLE time history.
|