検索クエリーを入力してください
<book_title> を検索 ...
Cluster Server 7.3.1 エージェント開発者ガイド - AIX、Linux、Solaris、Windows
Last Published:
2018-01-17
Product(s):
InfoScale & Storage Foundation (7.3.1)
- 概要
- エージェントのエントリポイントの概要
- エージェントのエントリポイントについて
- エージェントエントリポイントの説明
- open エントリポイントについて
- monitor エントリポイントについて
- online エントリポイントについて
- offline エントリポイントについて
- clean エントリポイントについて
- action エントリポイントについて
- info エントリポイントについて
- attr_changed エントリポイントについて
- close エントリポイントについて
- shutdown エントリポイントについて
- imf_init エントリポイントについて
- imf_register エントリポイントについて
- imf_getnotification エントリポイントについて
- migrate エントリポイントについて
- meter エントリポイントについて
- エントリポイントの戻り値
- C++ またはスクリプトエントリポイントの使用上の注意事項
- エージェント情報ファイルについて
- ArgList 属性と ArgListValues 属性について
- C++ でのエントリポイントの作成
- C++ でのエントリポイントの作成について
- データ構造
- C++ のエントリポイントの構文
- エージェントフレームワークの基本関数
- VCSAgGetMonitorLevel
- VCSAgGetFwVersion
- VCSAgGetRegVersion
- VCSAgRegisterEPStruct
- VCSAgSetCookie2
- VCSAgRegister
- VCSAgUnregister
- VCSAgGetCookie
- VCSAgStrlcpy
- VCSAgStrlcat
- VCSAgSnprintf
- VCSAgCloseFile
- VCSAgDelString
- VCSAgExec
- VCSAgExecWithTimeout
- VCSAgGenSnmpTrap
- VCSAgSendTrap
- VCSAgLockFile
- VCSAgInitEntryPointStruct
- VCSAgSetStackSize
- VCSAgUnlockFile
- VCSAgValidateAndSetEntryPoint
- VCSAgSetLogCategory
- VCSAgGetProductName
- VCSAgMonitorReturn
- VCSAgSetResEPTimeout
- VCSAgDecryptKey
- VCSAgGetConfDir
- VCSAgGetHomeDir
- VCSAgGetLogDir
- VCSAgGetSystemName
- VCSAG_CONSOLE_LOG_MSG
- VCSAG_LOG_MSG
- VCSAG_LOGDBG_MSG
- VCSAG_RES_LOG_MSG
- コンテナサポートのためのエージェントフレームワーク基本関数
- スクリプトでのエントリポイントの作成
- スクリプトでのエントリポイントの作成について
- スクリプトエントリポイントの構文
- エージェントフレームワークの基本関数
- VCSAG_GET_MONITOR_LEVEL
- VCSAG_GET_AGFW_VERSION
- VCSAG_GET_REG_VERSION
- VCSAG_SET_RES_EP_TIMEOUT
- VCSAG_GET_ATTR_VALUE
- VCSAG_SET_RESINFO
- VCSAG_MONITOR_EXIT
- VCSAG_SYSTEM
- VCSAG_SU
- VCSAG_RETURN_IMF_RESID
- VCSAG_RETURN_IMF_EVENT
- VCSAG_BLD_PSCOMM
- VCSAG_PHANTOM_STATE
- VCSAG_SET_ENVS
- VCSAG_LOG_MSG
- VCSAG_LOGDBG_MSG
- VCSAG_SQUEEZE_SPACES
- コンテナをサポートするエージェントフレームワーク基本関数
- スクリプトのエントリポイントの例
- エージェントメッセージのログ
- カスタムエージェントの作成
- スクリプトベースの IMF 対応カスタムエージェントの作成
- エージェントのテスト
- 静的タイプ属性
- 静的属性について
- 静的タイプ属性の定義
- ActionTimeout
- AdvDbg
- AEPTimeout
- AgentClass
- AgentDirectory
- AgentFailedOn
- AgentFile
- AgentPriority
- AgentReplyTimeout
- AgentStartTimeout
- AlertOnMonitorTimeouts
- ArgList
- AttrChangedTimeout
- AvailableMeters
- CleanRetryLimit
- CleanTimeout
- CloseTimeout
- ContainerOpts
- ConfInterval
- EPClass
- EPPriority
- ExternalStateChange
- FaultOnMonitorTimeouts
- FaultPropagation
- FireDrill
- IMF
- IMFRegList
- InfoInterval
- InfoTimeout
- IntentionalOffline
- LevelTwoMonitorFreq
- LogDbg
- LogFileSize
- LogViaHalog
- ManageFaults
- Meters
- MeterControl
- MeterRegList
- MeterRetryLimit
- MeterTimeout
- MonitorInterval
- MonitorStatsParam
- MonitorTimeout
- MigrateTimeout
- MigrateWaitLimit
- NumThreads
- OfflineMonitorInterval
- OfflineTimeout
- OfflineWaitLimit
- OnlineClass
- OnlinePriority
- OnlineRetryLimit
- OnlineTimeout
- OnlineWaitLimit
- OpenTimeout
- Operations
- RegList
- RestartLimit
- ScriptClass
- ScriptPriority
- SourceFile
- SupportedActions
- SupportedOperations
- ToleranceLimit
- 状態の遷移図
- 国際化されたメッセージ
- First Failure Data Capture(FFDC)を使用した VCS リソースの予期しない動作のトラブルシューティング
- 付録 A. 5.0 より前の VCS エージェントの使用
例: C++ での info エントリポイントの実装
VCSAgValidateAndSetEntryPoint() パラメータを、エントリポイントの関数(res_info)の名前に設定します。
次の例に示すように、エントリポイントに info 出力バッファを割り当てます。バッファは任意のサイズにできますが(例では 80)、エージェントフレームワークにより 2048 バイトに切り捨てられます。省略可能な名前と値の組み合わせでは、名前と値のそれぞれに 4096 バイトの限度があります(例では 15 を使用)。
V51 エントリポイントの例:
extern "C" unsigned int res_info(const char *res_name,
VCSAgResInfoOp resinfo_op, void **attr_val, char **info_output,
char ***opt_update_args, char ***opt_add_args)
{
struct stat stat_buf;
int I;
char **args = NULL;
char *out = new char [80];
*info_output = out;
VCSAgSnprintf(out, 80,"Output of info entry point - updates
the \"Msg\" key in ResourceInfo attribute");
// Use the stat system call on the file to get its
// information The attr_val array will look like "PathName"
// "1" "<pathname value>" ... Assuming that PathName is the
// first attribute in the attr_val array, the value
// of this attribute will be in index 2 of this attr_val
// array
if (attr_val[2]) {
if ((strlen((CHAR *)(attr_val[2])) != 0) &&
(stat((CHAR *)(attr_val[2]), &stat_buf) == 0)) {
if (resinfo_op == VCSAgResInfoAdd) {
// Add and initialize all the static and
// dynamic keys in the ResourceInfo attribute
args = new char * [7];
for (I = 0; I < 6; I++) {
args[i] = new char [15];
}
// All the static information - file owner
// and group
VCSAgSnprintf(args[0], 15, "%s", "Owner");
VCSAgSnprintf(args[1], 15, "%d",
stat_buf.st_uid);
VCSAgSnprintf(args[2], 15, "%s", "Group");
VCSAgSnprintf(args[3], 15, "%d",
stat_buf.st_gid);
// Initialize the dynamic information for the file
VCSAgSnprintf(args[4], 15, "%s", "FileSize");
VCSAgSnprintf(args[5], 15, "%d",
stat_buf.st_size);
args[6] = NULL;
*opt_add_args = args;
}
else {
// Simply update the dynamic keys in the
// ResourceInfo attribute. In this case, the
// dynamic info on the file
args = new char * [3];
for (I = 0; I < 2; I++) {
args[i] = new char [15];
}
VCSAgSnprintf(args[0], 15, "%s", "FileSize");
VCSAgSnprintf(args[1], 15, "%d",
stat_buf.st_size);
args[2] = NULL;
*opt_update_args = args;
}
}
else {
// Set the output to indicate the error
VCSAgSnprintf(out, 80, "Stat on the file %s failed",
attr_val[2]);
return 1;
}
}
else {
// Set the output to indicate the error
VCSAgSnprintf(out, 80, "Error in arglist values passed to
the info entry point");
return 1;
}
// Successful completion of the info entry point
return 0;
} // End of entry point definition