More...
#include <signal.h>
#include "../../statistics.h"
#include "alarm_checks.h"
#include "sub_agent.h"
#include "utilities.h"
#include "openserObjects.h"
#include "openserMIBNotifications.h"

Go to the source code of this file.
Functions | |
| int | check_dialog_alarm (int threshold_to_compare_to) |
| int | check_msg_queue_alarm (int threshold_to_compare_to) |
| void | run_alarm_check (unsigned int ticks, void *attr) |
Definition in file alarm_checks.c.
| int check_dialog_alarm | ( | int | threshold_to_compare_to | ) |
Returns the number of active dialogs if they exceed the threshold, and zero otherwise.
Definition at line 74 of file alarm_checks.c.
References get_statistic().
Referenced by handle_openserDialogLimitAlarmStatus(), handle_openserDialogLimitMajorAlarm(), handle_openserDialogLimitMinorAlarm(), and run_alarm_check().
| int check_msg_queue_alarm | ( | int | threshold_to_compare_to | ) |
Returns the number of bytes currently waiting in the msg queue if they exceed the threshold, and zero otherwise. If threshold_to_compare_to is < 0, then no check will be performed and zero always returned.
Definition at line 52 of file alarm_checks.c.
References get_total_bytes_waiting().
Referenced by handle_openserMsgQueueDepthAlarmStatus(), handle_openserMsgQueueDepthMajorAlarm(), handle_openserMsgQueueDepthMinorAlarm(), and run_alarm_check().
| void run_alarm_check | ( | unsigned int | ticks, | |
| void * | attr | |||
| ) |
This function will be called periodically from an OpenSER timer. The first time it is called, it will query OPENSER-MIB for configured thresholds.
Definition at line 96 of file alarm_checks.c.
References ALARM_AGENT_NAME, check_dialog_alarm(), check_msg_queue_alarm(), dialog_major_threshold, dialog_minor_threshold, get_dialog_major_threshold(), get_dialog_minor_threshold(), get_msg_queue_major_threshold(), get_msg_queue_minor_threshold(), register_with_master_agent(), send_openserDialogLimitMajorEvent_trap(), send_openserDialogLimitMinorEvent_trap(), send_openserMsgQueueDepthMajorEvent_trap(), and send_openserMsgQueueDepthMinorEvent_trap().
Referenced by mod_init().
1.5.6