InfoScale™ 9.0 Cluster Server Agent Developer's Guide - AIX, Linux, Solaris, Windows
- Introduction
- Agent entry point overview
- About agent entry points
- Agent entry points described
- About the action entry point
- About the info entry point
- Considerations for using C++ or script entry points
- About the agent information file
- About the ArgList and ArgListValues attributes
- Creating entry points in C++
- About creating entry points in C++
- Syntax for C++ entry points
- Agent framework primitives
- Agent Framework primitives for container support
- Creating entry points in scripts
- About creating entry points in scripts
- Syntax for script entry points
- Agent framework primitives
- VCSAG_GET_ATTR_VALUE
- Agent Framework primitives with container support
- Example script entry points
- Logging agent messages
- Building a custom agent
- Building a script based IMF-aware custom agent
- Creating XML file required for AMF plugins to do resource registration for online and offline state monitoring
- Testing agents
- Static type attributes
- About static attributes
- Static type attribute definitions
- AdvDbg
- ArgList
- State transition diagram
- Internationalized messages
- Troubleshooting VCS resource's unexpected behavior using First Failure Data Capture (FFDC)
- Appendix A. Using pre-5.0 VCS agents
VCSAgLogI18NConsoleMsg
void VCSAgLogI18NConsoleMsg(int tag, const char *msg, int msg_id, const char *arg1_string, const char *arg2_string, const char *arg3_string, const char *arg4_string, int flags);
This primitive requests that the VCS agent framework write an internationalized message with a message ID and four string arguments to the agent log file
UNIX: $VCS_LOG/log/resource_type_A.log
The message must not exceed 4096 bytes. A message greater that 4096 bytes is truncated. The size of all argument strings combined must not exceed 4096 bytes. If the argument string total exceeds 4096 bytes, then each argument is allowed an equal portion of 4096 bytes and truncated if it exceeds the allowed portion.
tag can be any value from TAG_A to TAG_Z. Tags A through E are enabled by default. To enable other tags, use the halog command. flags can be zero or more of LOG_NONE, LOG_TIMESTAMP (prints date and time), LOG_NEWLINE (prints a new line), and LOG_TAG (prints tag). This primitive can be called from any entry point.
For example:
#include "VCSAgApi.h" ... char buffer[256]; sprintf(buffer, "VCS:2015002:IP:%s:monitor:Device %s address %s", res_name, device, address); VCSAgLogI18NConsoleMsg(TAG_B, buffer, 2015002, res_name, device, address, NULL, LOG_TAG|LOG_TIMESTAMP|LOG_NEWLINE);