hagsvote Command

Purpose

Gets vote information for group services groups.

Syntax

hagsvote [-h host] [-l] [-a argument] [-c] -g group_name

hagsvote [-h host] [-l] [-a argument] [-c] -s subsystem_name

hagsvote [-h host] [-l] [-a argument] [-c] -p subsystem_pid

Description

Use the hagsvote command to query the status of voting protocols for group services.

Flags

-a
Specifies a group services group name. This group name is different from that of the -g flag. In this case, the group was created from the client's first call to join the protocol.
-c
Requests the canonical output of the group services voting information. The output is displayed in English regardless of the installed language locale. If -c is not specified, the daemon's locale will be used for the output.
-g group_name
Specifies a group of subsystems to get status for. The command is unsuccessful if the group_name variable is not contained in the subsystem object class.
-h host
Specifies the host name which is getting status.
-l
Requests detailed output in "long" form.
-p subsystem_pid
Specifies a particular instance of the subsystem_pid variable to get the vote for.
-s subsystem_name
Specifies a subsystem to vote on. The subsystem_name variable can be the actual subsystem name or the synonym name for the subsystem. The command is unsuccessful if the subsystem_name variable is not contained in the subsystem object class.

Parameters

daemon_name
Specifies the name used by the daemon to name log files and identify its messages in the AIX® error log.

Security

You must have root privilege to run this command.

Exit Status

0
Indicates the successful completion of the command.
non-zero
Indicates that an error occurred.

Restrictions

This command is valid in a PSSP environment only.

Standard Output

This command writes error messages (as necessary) to standard error.

Standard Error

This command writes error messages, as necessary, to standard error.

Examples

  1. To see information about the status of the voting protocol for the group theSourceGroup in long form, enter:
    hagsvote -ls cthags -a theSourceGroup (locale-dependent)
    The output will look like this:
    Number of groups: 4
    Group name [theSourceGroup] GL node [26] voting data:
    GL in phase [1] of n-phase protocol of type [Join].
    Local voting data:
    Number of providers: 1
    Number of providers not yet voted: 1 (vote not submitted).
    Given vote: [No vote value] Default vote: [No vote value]
    ProviderID Voted? Failed? Conditional?
    [101/26] No No Yes
    Global voting data:
    Number providers not yet voted: 1
    Given vote: [No vote value] Default vote: [No vote value]
    Nodes that have voted: []
    Nodes that have not voted: [26]
    The first line of the output means that the total number of groups is 4. The second line provides the group name and the group leader node (in this case 26). The remaining lines give the voting data:
    • The group leader is in phase 1 of a n-phase protocol.
    • The protocol is the Join protocol.
    • For the local node, it has 1 provider, the number of providers which have not voted yet is 1.
    • No default vote value is given and no vote value is given.
    • Under the line "ProviderID Voted? Failed? Conditional?," "[101/16] No No Yes," means that the provider ID is 101/26, not voted yet, not failed, but wait for the vote (so it is conditional).
    The output then shows the global voting status:
    • The number of providers that have not voted yet is 1.
    • No vote value given yet, no default vote value.
    • The nodes that have voted is none.
    • The nodes that have not voted is node 26.
  2. In the following example, the meaning of each line of output is the same as in the first example except that node 26 is the group leader node.
    hagsvote -ls cthags -a theSourceGroup -c (canonical form)
    The output will look like this:
    Number of groups: 4
    Group Name: theSourceGroup
    GL Node: 26 (I am GL)
    Current phase number of an n-phase protocol: 1
    Protocol name: [Join]
    Local voting data:
    Number of local providers: 1
    Number of local providers not yet voted: 1 (vote not submitted)
    Given vote: [No vote value] Default vote: [No vote value]Global voting data:
    Number of nodes in group: 1
    Number of global providers not yet voted: 1
    Given vote: [No vote value] Default vote: [No vote value]
    Nodes that have voted: []
    Nodes that have not voted: [26]

Location

/usr/sbin/rsct/bin/hagsvote
Contains the hagsvote command

Files

/var/ha/log/hags_nodenum_instnum. syspar_name
Contains the log of the hagsd daemons on the nodes.
/var/ha/log/hags.syspar_name_nodenum_instnum.syspar_name
Contains the log of each hagsd daemon on the control workstation.
The file names include the following variables:
  • nodenum is the node number on which the daemon is running
  • instnum is the instance number of the daemon
  • syspar_name is the name of the system partition in which the daemon is running.