Queries resource variables.
haemqvar [ -H domain | -S domain ] [ -c | -d | -i ] [ -f file ] [ -h ] [ class var rsrcID [ " ] ]
The haemqvar command queries the Event Management subsystem for information about resource variables. By default, the command writes to standard output the definitions for all resource variables in the current SP domain, that is, the current SP system partition as defined by the SP_NAME environment variable. If SP_NAME is not set the default system partition is used. The -S flag can be used to specify another SP domain (system partition). To query variables in an HACMP™ domain, use the -H flag. For an SP domain, the domain flag argument is a system partition name. For an HACMP domain, the domain flag argument is an HACMP cluster name. When the -H flag is specified, the command must be executed on one of the nodes in the HACMP/ES cluster.
Because the default behavior of this command can produce a large amount of output, standard output should be redirected to a file.
If the -d flag is specified only the resource variable name and a short description are written to standard output, one name and description per line.
If the -c flag is specified the current values of all resource variables instances are written to standard output, one per line. The line of output contains the location of the resource variable instance (node number), the resource variable name, the resource ID of the instance and the resource variable instance value. If the resource variable is a Structured Byte String (SBS) data type, then the value of each SBS field is reported.
The -i flag reports the same information as the -c flag except that the value of the variable instance is the last known value rather than the current value. The -i flag is useful for determining what resource variable instances exist.
For both the -c and the -i flags, if an error is encountered in obtaining information about a resource variable instance, the output line contains an error message, symbolic error codes, the location of where the error originated (if it can be determined), the resource variable name and the resource ID.
To return information about specific resource variables, specify the class, var and rsrcID operands. These operands can be repeated to specify additional resource variables. In addition, the var and rsrcID operands can be wildcarded to match a number of resource variables. Note that null string operands or an asterisk must be quoted in the shells.
When the resource variable name is wildcarded in the first manner, then all resource variables, as further limited by the class and rsrcID arguments, are targets of the query. When the resource variable name is wildcarded in the second manner, all resource variables whose high-order (leftmost) components match the var argument, as further limited by the class and rsrcID arguments, are targets of the query.
All resource variable instances, or definitions if neither the -c nor the -i flags are specified, of the variables specified by the class and var arguments that match the rsrcID argument are the targets of the query.
If neither the -c nor the -i flags are specified, the rsrcID argument is a semicolon-separated list of resource ID element names. If either the -c or the -i flags is specified, the rsrcID argument is a semicolon-separated list of name/value pairs. A name/value pair consists of a resource ID element name followed by an equal sign followed by a value of the resource ID element. An element value may consist of a single value, a range of values, a comma-separated list of single values or a comma-separated list of ranges. A range takes the form a-b and is valid only for resource ID elements of type integer (the type information can be obtained from the variable definition). There can be no blanks in the resource ID.
A resource ID element is wildcarded by specifying its value as the asterisk character. Only variables that are defined to contain the elements, and only the elements, specified in the rsrcID argument are targets of the query. If any element of the resource ID consists of the asterisk character, rather than a name/value pair (or just a name if querying for definitions), all variables that are defined to contain at least the remaining specified elements are targets of the query. The entire resource ID is wildcarded if it consists of only the asterisk character; all instances of all resource variables, as further limited by the class and var arguments, are targets of the query.
Note that the rsrcID argument must be quoted in the shells if it contains semicolons or asterisks.
The class, var and rsrcID operands can be placed in a file, one set of operands per line, instead of being specified as command arguments. Use the -f flag to specify the name of the file to the command. If the -f flag is used, any operands to the command are ignored. Within the file, null strings are specified as two adjacent double quotation marks. A completely wildcarded resource ID can either be a single asterisk (*) or an asterisk in double quotation marks ("*"). The arguments must be separated by blank spaces or tabs on each line.
NodeNum=5;VG=rootvg;LV=hd4
NodeNum=*;VG=rootvg;LV=hd4
NodeNum=*;VG=*;LV=*
NodeNum=9
NodeNum=*
NodeNum=9;VG=*;*
NodeNum=*;*
If the specification of the class, var or rsrcID arguments are in error, the output line contains an error message, symbolic error codes and the specified class name, resource variable name, and resource ID.
You must have root privilege and write access to the SDR to run this command.
You should be running on the control workstation. Before running this command, you must set the SP_NAME environment variable to the appropriate system partition name.
This command is valid in a PSSP environment only.
When the command executes successfully, it writes the following informational messages:
Reading Event Management data for partition syspar_name
CDB=new_EMCDB_file_name Version=EMCDB_version_string
This command writes error messages (as necessary) to standard error.
haemqvar -H HAcluster > vardefs.out
haemqvar -H HAcluster -d "" "" "VG;*"
haemqvar -H HAcluster -d "" "" "VG;NodeNum"
This command is part of the Reliable Scalable Cluster Technology (RSCT) fileset.