msiDigestMonStat ( msParam_t *  cpu_wght,
msParam_t *  mem_wght,
msParam_t *  swap_wght,
msParam_t *  runq_wght,
msParam_t *  disk_wght,
msParam_t *  netin_wght,
msParam_t *  netout_wght,
ruleExecInfo_t *  rei 
)
Description:
This microservice calculates and stores a load factor for each connected resource based on the weighting values passed in as parameters.
Module:
core
Since:
pre-2.1
Author:
Jean-Yves Nief
Date:
2009-06
Note:
The following values are loaded from R_LOAD_SERVER:
  • cpu_used
  • mem_used
  • swap_used
  • runq_load
  • disk_space
  • net_input
  • net_output
The stored load factor is calculated as such:
  • load_factor = cpu_wght*cpu_used + mem_wght*mem_used + swap_wght*swap_used + runq_wght*runq_load + disk_wght*disk_space + netin_wght*net_input + netout_wght*net_output
Example Usage:
See clients/icommands/test/rules3.0/ and https://www.irods.org/index.php/Resource_Monitoring_System
Parameters:
[in] cpu_wght - Required - a msParam of type STR_MS_T defining relative CPU weighting.
[in] mem_wght - Required - a msParam of type STR_MS_T defining relative memory weighting
[in] swap_wght - Required - a msParam of type STR_MS_T defining relative swap weighting
[in] runq_wght - Required - a msParam of type STR_MS_T defining relative run queue weighting
[in] disk_wght - Required - a msParam of type STR_MS_T defining relative disk space weighting
[in] netin_wght - Required - a msParam of type STR_MS_T defining relative inbound network weighting
[in] netout_wght - Required - a msParam of type STR_MS_T defining relative outbound network weighting
[in,out] rei - The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
R_SERVER_LOAD table content
iCAT Attributes Modified:
R_SERVER_LOAD_DIGEST table content
Side Effect:
none
Returns:
integer
Return values:
0 upon success
Precondition:
N/A
Postcondition:
N/A
See also:
N/A

Definition at line 867 of file reIn2p3SysRule.c.

Generated on Sat Nov 16 22:27:08 2013 for iRODS Documentation by  doxygen 1.6.3