hagsns Command

Purpose

Gets group services name server information.

Syntax

hagsns [-h host] [-c] -g group_name

hagsns [-h host] [-c] -s subsystem_name

hagsns [-h host] [-c] -p subsystem_pid

Description

Use the hagsns command to query the status of the group services nameserver.

Flags

-c
Forces the output as "English_only." If the -c flag 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 to obtain name server status for.
-p subsystem_pid
Specifies a particular instance of the subsystem_pid to obtain name server status for.
-s subsystem_name
Specifies a subsystem to get status for. 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 authority to run this command.

Exit Status

0
Indicates that the command completed successfully.
a non-zero value
Indicates that an error occurred.

Restrictions

This command is valid in a PSSP environment only.

Standard Output

When the -h flag is specified, this command's usage statement is written to standard output.

Standard Error

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

Examples

To get domain information from the group services subsystem, enter:
hagsns -c -s cthags
or
hagsns -s cthags
The output will look like this:
HA GS NameServer Status
NodeID=1.16, pid=14460, domainID=6.14, NS established,CodeLevel=GSLevel(DRL=8)
NS state=kCertain, protocolInProgress=kNoProtocol,outstandingBroadcast=KNoBcast
Process started on Jun 19 18:34:20, (10d 20:19:22) ago, HB connection took (19:14:9).
Initial NS certainty on Jun 20 13:48:45, (10d 1:4:57) ago, taking (0:0:15).
Our current epoch of Jun 23 13:05:19 started on (7d 1:48:23), ago.
Number of UP nodes: 12
List of UP nodes: 0 1 5 6 7 8 9 11 17 19 23 26

In this example, domainID=6.14 means that node 6 is the name server (NS) node. The domain ID consists of a node number and an incarnation number. The incarnation number is an integer, incremented whenever the group services daemon is started. NS established means that the name server was established.

Location

/usr/sbin/rsct/bin/hagsns
Contains the hagsns 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.