Prosody generic: API: sm_get_module_info
Prototype Definition
int sm_get_module_info(struct sm_module_info_parms *moduleinfop)
Parameters
- *moduleinfop
-
a structure of the following type:
typedef struct sm_module_info_parms {
tSMModuleId module; /* in */
tSM_INT firmware_running; /* out */
tSM_INT firmware_id; /* out */
tSM_INT average_loading; /* out */
tSM_INT max_loading; /* out */
tSM_INT module_slot; /* out */
tSM_INT min_stream; /* out */
tSM_INT stream_count; /* out */
} SM_MODULE_INFO_PARMS;
Description
Fetches information about a module.
Note that fields apart from
module_slot
,
min_stream
and
stream_count
are undefined for Prosody S and for Prosody X. The cpumon
facility should be used to obtain work load information.
Fields
- module
- A value obtained from
sm_open_module()
which indicates the module on which information is required.
- firmware_running
- Indicator of whether or not firmware is running on this module.
Zero if firmware is not running.
Note that this refers to the kernel, not individual software
modules.
- firmware_id
- This field is obsolete.
- average_loading
- The percentage (0..100) average work load of the module over the last
second.
- max_loading
- The percentage (0..100) peak work load of the module over the
last second.
- module_slot
- The position of the module on its carrier card.
- min_stream
- The number of the first stream accessible to this module.
- stream_count
- The count of streams accessible to this module.
Returns
0
if call completed successfully, otherwise a standard error such as:
- ERR_SM_DEVERR - device error
- ERR_SM_NO_SUCH_MODULE - if no such module exists
This function is part of the Prosody generic API.