VCS 6.1 : How to Query Log Data Files using the hamsg?

By default, LDF files are written to the following directory:
UNIX: /var/VRTSvcs/ldf
VCS log messages have the following format:
Timestamp Mnemonic Severity UMI message_text
::: To display specific LDF data
# hamsg [-any] [-sev C|E|W|N|I][-otype VCS|RES|GRP|SYS|AGT][-oname object_name] [-cat category] [-msgid message_ID][-path path_name] [-lang language] LDF_file
-any Specifies hamsg return messages that match any of the specified query options.
-sev Specifies hamsg return messages that match the specified message severity Critical, Error, Warning, Notice, or Information.
-otype Specifies hamsg return messages that match the specified object type
VCS = general VCS messages
RES = resource
GRP = service group
SYS = system
AGT = agent
-oname : Specifies hamsg return messages that match the specified object name.
-cat : Specifies hamsg return messages that match the specified category. For example, the value 2 in the message id “V-16-2-13067”
-msgid : Specifies hamsg return messages that match the specified message ID. For example, the value 13067 the message id “V-16-2-13067″‘
-path : Specifies where hamsg looks for the specified LDF. If not specified, hamsg looks for files in the default directory /var/VRTSvcs/ldf.
-lang : Specifies the language in which to display messages. For example, the value en specifies English and “ja” specifies Japanese.
The hamsg utility uses the VCS BMC (binary message catalog) to correctly display messages found in the LDF in the user’s language. If a message in the LDF cannot be found in the existing set of BMCs, the following English message will be displayed:
Could not find message Message_ID: arg 1 = arg1_value, arg2 = arg2_value, …
Example: Could not find message 50010: arg1 = G1, arg2 = thor63
Note: arg1, arg2, and so on refer to the message arguments that need to be inserted into message Message_ID. If the number of message arguments that are specified in the LDF do not match with the corresponding message found in the BMC, “???” is inserted for all message argument placeholders and the message will be displayed.
::: To Displays the entire contents of the engine_A log:
#hamsg engine_A
::: To Displays miscellaneous LDF information about the hashadow_A LDF:
#hamsg -info hashadow_A
::: To Displays all messages that are of object type “resource” and whose object name is “FOO1” found in the engine_A log:
#hamsg -otype RES -oname FOO1 engine_A
::: To Displays all Warning messages in the FileOnOff_A log:
#hamsg -sev W FileOnOff_A
::: To Displays all messages that either have a Critical Severity or a message ID of 10051 in the engine_A log:
#hamsg -any -sev C -msgid 10051 engine_A
::: To Displays a list of available LDF files that can be viewed on the current system:
#hamsg -list
1 Response
[…] Read –Â How to Query Log Data Files using the hamsg? […]