irods
4.3.0
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 "irods/msParam.h"
#include "irods/rods.h"
#include "irods/rsGlobalExtern.hpp"
#include "irods/rcGlobalExtern.h"
#include "irods/rodsLog.h"
#include "irods/sockComm.h"
#include "irods/getRodsEnv.h"
#include "irods/rcConnect.h"
#include "irods/generalRowInsert.h"
#include "irods/generalRowPurge.h"
#include "irods/generalAdmin.h"
#include <string>
Go to the source code of this file.
Classes | |
struct | ThreadInput |
struct | ResourceInfo |
Macros | |
#define | NFIELDS 4 |
#define | MAXLEN 100 |
#define | MAXSTR 30 |
#define | MAXLIST 40 |
#define | MON_PERF_SCRIPT "irodsServerMonPerf" |
#define | NRESULT 7 |
#define | MAX_VALUE 512 |
#define | MAX_MESSAGE_SIZE 2000 |
#define | MAX_NSERVERS 512 |
#define | TIMEOUT 20 |
#define | MON_OUTPUT_NO_ANSWER "#-1#-1#-1#-1#-1#-1#-1#-1#" |
#define | LEN_SECONDS 4 |
Typedefs | |
using | thrInp_t = ThreadInput |
using | monInfo_t = ResourceInfo |
Functions | |
int | checkHostAccessControl (const std::string &_user_name, const std::string &_client_host, const std::string &_groups_name) |
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 LEN_SECONDS 4 |
Definition at line 30 of file reIn2p3SysRule.hpp.
#define MAX_MESSAGE_SIZE 2000 |
Definition at line 26 of file reIn2p3SysRule.hpp.
#define MAX_NSERVERS 512 |
Definition at line 27 of file reIn2p3SysRule.hpp.
#define MAX_VALUE 512 |
Definition at line 25 of file reIn2p3SysRule.hpp.
#define MAXLEN 100 |
Definition at line 19 of file reIn2p3SysRule.hpp.
#define MAXLIST 40 |
Definition at line 21 of file reIn2p3SysRule.hpp.
#define MAXSTR 30 |
Definition at line 20 of file reIn2p3SysRule.hpp.
#define MON_OUTPUT_NO_ANSWER "#-1#-1#-1#-1#-1#-1#-1#-1#" |
Definition at line 29 of file reIn2p3SysRule.hpp.
#define MON_PERF_SCRIPT "irodsServerMonPerf" |
Definition at line 23 of file reIn2p3SysRule.hpp.
#define NFIELDS 4 |
Definition at line 18 of file reIn2p3SysRule.hpp.
#define NRESULT 7 |
Definition at line 24 of file reIn2p3SysRule.hpp.
#define TIMEOUT 20 |
Definition at line 28 of file reIn2p3SysRule.hpp.
using monInfo_t = ResourceInfo |
Definition at line 54 of file reIn2p3SysRule.hpp.
using thrInp_t = ThreadInput |
Definition at line 44 of file reIn2p3SysRule.hpp.
int checkHostAccessControl | ( | const std::string & | _user_name, |
const std::string & | _client_host, | ||
const std::string & | _groups_name | ||
) |
Definition at line 324 of file reIn2p3SysRule.cpp.
References ERROR, i, irods::KW_CFG_ACCESS_ENTRIES, irods::KW_CFG_ADDRESS, irods::KW_CFG_GROUP, irods::KW_CFG_HOST_ACCESS_CONTROL, irods::KW_CFG_MASK, and irods::KW_CFG_USER.
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 437 of file reIn2p3SysRule.cpp.
References addInxIval(), addInxVal(), checkHostAccessControl(), clearGenQueryInp(), RsComm::clientUser, COL_USER_GROUP_NAME, COL_USER_NAME, freeGenQueryOut(), i, SqlResult::len, LOG_NOTICE, MAX_NAME_LEN, MAX_SQL_ROWS, GenQueryInp::maxRows, NULL, RE_TEST_MACRO, RsComm::remoteAddr, rodsLog(), GenQueryOut::rowCnt, RuleExecInfo::rsComm, rsGenQuery(), rstrcpy(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, GenQueryOut::sqlResult, RuleExecInfo::status, UserInfo::userName, and SqlResult::value.
Referenced by irods::lookup_table< ValueType, KeyType, HashType >::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 871 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(), i, MsParam::inOutStruct, SqlResult::len, LOG_ERROR, MAX_NAME_LEN, MAX_NSERVERS, MAX_SQL_ROWS, GenQueryInp::maxRows, NRESULT, NULL, RE_TEST_MACRO, RsComm::rError, rodsLog(), rodsLogAndErrorMsg(), GenQueryOut::rowCnt, RuleExecInfo::rsComm, rsGeneralRowInsert(), rsGenQuery(), rstrcpy(), SELECT_MAX, GenQueryInp::selectInp, GenQueryInp::sqlCondInp, GenQueryOut::sqlResult, RuleExecInfo::status, STR_MS_T, generalRowInsertInp_t::tableName, MsParam::type, and SqlResult::value.
Referenced by irods::lookup_table< ValueType, KeyType, HashType >::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 742 of file reIn2p3SysRule.cpp.
References MsParam::inOutStruct, LOG_ERROR, MAXLEN, NULL, RE_TEST_MACRO, RsComm::rError, rodsLog(), rodsLogAndErrorMsg(), RuleExecInfo::rsComm, rsGeneralRowPurge(), generalRowPurgeInp_t::secondsAgo, RuleExecInfo::status, STR_MS_T, generalRowPurgeInp_t::tableName, and MsParam::type.
Referenced by irods::lookup_table< ValueType, KeyType, HashType >::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 531 of file reIn2p3SysRule.cpp.
References ThreadInput::addPathToArgv, delim, irods::get_irods_home_directory(), getListOfResc(), i, if(), MsParam::inOutStruct, LEN_SECONDS, 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, strcpy(), ThreadInput::threadId, threadIsAlive, TIMEOUT, and ResourceInfo::vaultPath.
Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().