検索クエリーを入力してください
<book_title> を検索 ...
Cluster Server 7.3.1 エージェント開発者ガイド - AIX、Linux、Solaris、Windows
Last Published:
2018-01-17
Product(s):
InfoScale & Storage Foundation (7.3.1)
- 概要
- エージェントのエントリポイントの概要
- エージェントのエントリポイントについて
- エージェントエントリポイントの説明
- action エントリポイントについて
- info エントリポイントについて
- C++ またはスクリプトエントリポイントの使用上の注意事項
- エージェント情報ファイルについて
- ArgList 属性と ArgListValues 属性について
- C++ でのエントリポイントの作成
- C++ でのエントリポイントの作成について
- C++ のエントリポイントの構文
- エージェントフレームワークの基本関数
- コンテナサポートのためのエージェントフレームワーク基本関数
- スクリプトでのエントリポイントの作成
- スクリプトでのエントリポイントの作成について
- スクリプトエントリポイントの構文
- エージェントフレームワークの基本関数
- VCSAG_GET_ATTR_VALUE
- コンテナをサポートするエージェントフレームワーク基本関数
- スクリプトのエントリポイントの例
- エージェントメッセージのログ
- カスタムエージェントの作成
- スクリプトベースの IMF 対応カスタムエージェントの作成
- エージェントのテスト
- 静的タイプ属性
- 静的属性について
- 静的タイプ属性の定義
- AdvDbg
- ArgList
- 状態の遷移図
- 国際化されたメッセージ
- First Failure Data Capture(FFDC)を使用した VCS リソースの予期しない動作のトラブルシューティング
- 付録 A. 5.0 より前の VCS エージェントの使用
VCSAgGetCookie
void *VCSAgGetCookie(const char *name);
この基本関数は、事前に VCSAgSetCookie2() を実行することによって設定した cookie をエージェントフレームワークが取得することを要求します。cookie が設定されていなかった場合は、NULL を返します。この基本関数は任意のエントリポイントから実行することが可能です。次に例を示します。
#include "VCSAgApi.h" ... // Assume that the online, offline, and monitor // operations on resource require a certain key. Also // assume that obtaining this key is time consuming, but // that it can be reused until this process is terminated. // // In this example, the open entry point obtains the key // and stores it as a cookie. Subsequent online, // offline, and monitor entry points get the cookie and // use the key. // // Note that the cookie name can be any unique string. // This example uses the resource name as the cookie name. // void *get_key() { ... } void res_open(const char *res_name, void **attr_val) { if (VCSAgGetCookie(res_name) == NULL) { void *key = get_key(); VCSAgSetCookie2(res_name, key); } } VCSAgResState res_monitor(const char *res_name, void **attr_val, int *conf_level_ptr) { VCSAgResState state = VCSAgResUnknown; *conf_level_ptr = 0; void *key = VCSAgGetCookie(res_name); if (key == NULL) { // Take care of the rare cases when the open // entry point failed to obtain the key and // set the the cookie. key = get_key(); VCSAgSetCookie2(res_name, key); } // Use the key for testing if the resource is // online, and set the state accordingly. ... return state; }