irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
![]() ![]() |
#include "msParam.h"
#include "rods.h"
#include "rsGlobalExtern.hpp"
#include "rcGlobalExtern.h"
#include "rsLog.hpp"
#include "rodsLog.h"
#include "sockComm.h"
#include "getRodsEnv.h"
#include "rcConnect.h"
#include "generalRowInsert.h"
#include "generalRowPurge.h"
#include "generalAdmin.h"
Go to the source code of this file.
Classes | |
struct | thrInp_t |
struct | monInfo_t |
Macros | |
#define | NFIELDS |
#define | MAXLEN 100 |
#define | MAXSTR 30 |
#define | MAXLIST 40 /* max number of entries in the access list tab. */ |
#define | HOST_ACCESS_CONTROL_FILE "host_access_control_config.json" |
#define | MON_PERF_SCRIPT "irodsServerMonPerf" |
#define | MON_CFG_FILE |
#define | NRESULT 7 /* number of metrics returned by MON_PERF_SCRIPT */ |
#define | OUTPUT_MON_PERF "../log/rodsMonPerfLog" |
#define | MAX_VALUE 512 /* for array definition */ |
#define | MAX_MESSAGE_SIZE 2000 |
#define | MAX_NSERVERS 512 /* max number of servers that can be monitored (load balancing) */ |
#define | TIMEOUT |
#define | MON_OUTPUT_NO_ANSWER |
#define | LEN_SECONDS 4 /* length in bytes for the encoding of number of seconds */ |
Functions | |
int | checkHostAccessControl (const std::string &, const std::string &, const std::string &) |
int | msiCheckHostAccessControl (ruleExecInfo_t *rei) |
int | 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) |
int | msiFlushMonStat (msParam_t *timespan, msParam_t *tablename, ruleExecInfo_t *rei) |
int | msiServerMonPerf (msParam_t *verbosity, msParam_t *probtime, ruleExecInfo_t *rei) |
#define HOST_ACCESS_CONTROL_FILE "host_access_control_config.json" |
Definition at line 29 of file reIn2p3SysRule.hpp.
#define LEN_SECONDS 4 /* length in bytes for the encoding of number of seconds */ |
Definition at line 40 of file reIn2p3SysRule.hpp.
#define MAX_MESSAGE_SIZE 2000 |
Definition at line 36 of file reIn2p3SysRule.hpp.
#define MAX_NSERVERS 512 /* max number of servers that can be monitored (load balancing) */ |
Definition at line 37 of file reIn2p3SysRule.hpp.
#define MAX_VALUE 512 /* for array definition */ |
Definition at line 35 of file reIn2p3SysRule.hpp.
#define MAXLEN 100 |
Definition at line 25 of file reIn2p3SysRule.hpp.
#define MAXLIST 40 /* max number of entries in the access list tab. */ |
Definition at line 27 of file reIn2p3SysRule.hpp.
#define MAXSTR 30 |
Definition at line 26 of file reIn2p3SysRule.hpp.
#define MON_CFG_FILE |
Definition at line 32 of file reIn2p3SysRule.hpp.
#define MON_OUTPUT_NO_ANSWER |
Definition at line 39 of file reIn2p3SysRule.hpp.
#define MON_PERF_SCRIPT "irodsServerMonPerf" |
Definition at line 31 of file reIn2p3SysRule.hpp.
#define NFIELDS |
Definition at line 24 of file reIn2p3SysRule.hpp.
#define NRESULT 7 /* number of metrics returned by MON_PERF_SCRIPT */ |
Definition at line 33 of file reIn2p3SysRule.hpp.
#define OUTPUT_MON_PERF "../log/rodsMonPerfLog" |
Definition at line 34 of file reIn2p3SysRule.hpp.
#define TIMEOUT |
Definition at line 38 of file reIn2p3SysRule.hpp.
int checkHostAccessControl | ( | const std::string & | , |
const std::string & | , | ||
const std::string & | |||
) |
Definition at line 318 of file reIn2p3SysRule.cpp.
References irods::error::code(), terminate_irods_processes::e, ERROR, irods::configuration_parser::get(), irods::get_full_path_for_config_file(), HOST_ACCESS_CONTROL_FILE(), INVALID_ANY_CAST, KEY_NOT_FOUND, irods::configuration_parser::load(), irods::log(), irods::error::ok(), PASS, and UNMATCHED_KEY_OR_INDEX.
Referenced by msiCheckHostAccessControl().
msiCheckHostAccessControl | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | upon success |
Definition at line 470 of file reIn2p3SysRule.cpp.
References addInxIval(), addInxVal(), checkHostAccessControl(), clearGenQueryInp(), rsComm_t::clientUser, COL_USER_GROUP_NAME, COL_USER_NAME, freeGenQueryOut(), SqlResult::len, LOG_NOTICE, MAX_NAME_LEN, MAX_SQL_ROWS, GenQueryInp::maxRows, NULL, RE_TEST_MACRO, rsComm_t::remoteAddr, rodsLog(), GenQueryOut::rowCnt, RuleExecInfo::rsComm, rsGenQuery(), rstrcpy(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, GenQueryOut::sqlResult, irods.pypyodbc::status, RuleExecInfo::status, userInfo_t::userName, and SqlResult::value.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
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 | ||
) |
[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. |
0 | upon success |
Definition at line 903 of file reIn2p3SysRule.cpp.
References addInxIval(), addInxVal(), generalRowInsertInp_t::arg1, generalRowInsertInp_t::arg2, GenQueryOut::attriCnt, clearGenQueryInp(), COL_SL_CPU_USED, COL_SL_CREATE_TIME, COL_SL_DISK_SPACE, COL_SL_MEM_USED, COL_SL_NET_INPUT, COL_SL_NET_OUTPUT, COL_SL_RESC_NAME, COL_SL_RUNQ_LOAD, COL_SL_SWAP_USED, freeGenQueryOut(), MsParam::inOutStruct, SqlResult::len, LOG_ERROR, MAX_NAME_LEN, MAX_NSERVERS, MAX_SQL_ROWS, GenQueryInp::maxRows, NRESULT, NULL, RE_TEST_MACRO, rsComm_t::rError, rodsLog(), rodsLogAndErrorMsg(), GenQueryOut::rowCnt, RuleExecInfo::rsComm, rsGeneralRowInsert(), rsGenQuery(), rstrcpy(), SELECT_MAX, GenQueryInp::selectInp, GenQueryInp::sqlCondInp, GenQueryOut::sqlResult, irods.pypyodbc::status, RuleExecInfo::status, STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, generalRowInsertInp_t::tableName, MsParam::type, and SqlResult::value.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
msiFlushMonStat | ( | msParam_t * | inpParam1, |
msParam_t * | inpParam2, | ||
ruleExecInfo_t * | rei | ||
) |
[in] | inpParam1 | - Required - a msParam of type STR_MS_T defining the timespan in hours. "default" is equal to 24 hours. |
[in] | inpParam2 | - Required - a msParam of type STR_MS_T defining the tablename to be flushed. Currently must be either "serverload" or "serverloaddigest". |
[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. |
0 | upon success |
Definition at line 774 of file reIn2p3SysRule.cpp.
References CAT_SUCCESS_BUT_WITH_NO_INFO, MsParam::inOutStruct, LOG_ERROR, MAXLEN, NULL, RE_TEST_MACRO, rsComm_t::rError, rodsLog(), rodsLogAndErrorMsg(), RuleExecInfo::rsComm, rsGeneralRowPurge(), generalRowPurgeInp_t::secondsAgo, RuleExecInfo::status, STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, generalRowPurgeInp_t::tableName, and MsParam::type.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
msiServerMonPerf | ( | msParam_t * | verb, |
msParam_t * | ptime, | ||
ruleExecInfo_t * | rei | ||
) |
[in] | verb | - a msParam of type STR_MS_T defining verbose mode:
|
[in] | ptime | - a msParam of type STR_MS_T defining probe time in seconds. "default" is equal to 10 seconds. |
[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. |
0 | upon success |
Definition at line 564 of file reIn2p3SysRule.cpp.
References thrInp_t::addPathToArgv, generate_iadmin_commands_for_41_to_42_upgrade::cmd, getListOfResc(), MsParam::inOutStruct, LEN_SECONDS, irods.pyparsing::line(), LOG_ERROR, LOG_NOTICE, LONG_NAME_LEN, MAX_NAME_LEN, MAX_NSERVERS, MAX_VALUE, MAXSTR, MON_CFG_FILE, MON_OUTPUT_NO_ANSWER, MON_PERF_SCRIPT, my_mutex, NULL, RE_TEST_MACRO, rodsLog(), rodsMonPerfLog(), RuleExecInfo::rsComm, rstrcat(), rstrcpy(), startMonScript(), RuleExecInfo::status, thrInp_t::threadId, threadIsAlive, TIMEOUT, and monInfo_t::vaultPath.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().