Starts the group services subsystems.
hagsctrl {-a | -s | -k | -d | -c | -u | -t | -o | -r | -h}
Group services provides distributed coordination and synchronization services for other distributed subsystems running on a set of nodes on a cluster. The hagsctrl control script controls the operation of the subsystems that are required for group services. These subsystems are under the control of the system resource controller (SRC) and belong to a subsystem group called hags. Associated with each subsystem is a daemon.
An instance of the group services subsystem executes on the control workstation and on every node of a system partition. Because group services provides its services within the scope of a system partition, its subsystems are said to be system partition-sensitive. This control script operates in a manner similar to the control scripts of other system partition-sensitive subsystems. It can be issued from either the control workstation or any of the system partition's nodes.
From an operational point of view, the group services subsystem group is organized as follows:
The hags subsystem is associated with the hagsd daemon.
The subsystem name on the nodes is hags. The hags subsystem on each node is associated with the system partition to which the node belongs.
On the control workstation, there are multiple instances of the subsystem, one for each system partition. Accordingly, the subsystem names on the control workstation have the system partition name appended to them. For example, for system partitions named sp_prod and sp_test, the subsystems on the control workstation are named hags.sp_prod and hags.sp_test.
The hagsd daemon provides the majority of the group services functions.
The hagsctrl script is not normally executed from the command line. It is normally called by the syspar_ctrl command during installation of the system, and partitioning or repartitioning of the system.
The hagsctrl script provides a variety of controls for operating the group services subsystems:
Before performing any of these functions, the script obtains the current system partition name (using the spget_syspar command) and the node number (using the node_number ) command. If the node number is zero, the control script is running on the control workstation.
Except for the clean and unconfigure functions, all functions are performed within the scope of the current system partition.
Adding the Subsystem
When the -a flag is specified, the control script uses the mkssys command to add the group services subsystems to the SRC. The control script operates as follows:
The service name that is entered in the /etc/services file is hags.syspar_name.
Starting the Subsystem
When the -s flag is specified, the control script uses the startsrc command to start the Group Services subsystems hags.
Stopping the Subsystem
When the -k flag is specified, the control script uses the stopsrc command to stop the Group Services subsystemshags.
Deleting the Subsystem
When the -d flag is specified, the control script uses the rmssys command to remove the Group Services subsystem from the SRC. The control script operates as follows:
Cleaning Up the Subsystems
When the -c flag is specified, the control script stops and removes the group services subsystems for all system partitions from the SRC. The control script operates as follows:
Unconfiguring the Subsystems
When the -u flag is specified, the control script performs the function of the -c flag in all system partitions and then removes all port numbers from the SDR allocated by the group services subsystems.
Prior to executing the hagsctrl command with the -u flag on the control workstation, the hagsctrl command with the -c flag must be executed from all of the nodes. If this subsystem is not successfully cleaned from all of the nodes, different port numbers may be used by this subsystem, leading to undefined behavior.
Turning Tracing On
When the -t flag is specified, the control script turns tracing on for the hagsd daemon, using the traceson command.
Turning Tracing Off
When the -o flag is specified, the control script turns tracing off (returns it to its default level) for the hagsd daemon, using the tracesoff command.
Refreshing the Subsystem
The -r flag has no effect for this subsystem.
Logging
While they are running, the group services daemons provide information about their operation and errors by writing entries in a log file in the /var/ha/log directory.
Each daemon limits the log size to a pre-established number of lines (5000 by default). When the limit is reached, the daemon appends the string .bak to the name of the current log file and begins a new log. If a .bak version already exists, it is removed before the current log is renamed.
You must have root privilege to run this script.
This command is valid in a PSSP environment only.
When the -h flag is specified, this command's usage statement is written to standard output.
This command writes error messages (as necessary) to standard error.
hagsctrl -a
hagsctrl -s
hagsctrl -k
hagsctrl -d
hagsctrl -c
hagsctrl -u
hagsctrl -t
hagsctrl -o
/usr/sbin/rsct/bin/hagsctrl
The file names include the following variables:
Commands: lssrc, startsrc, stopsrc, syspar_ctrl
Daemons: hagsd
Books: for information about the system resource controller (SRC), see AIX General Programming Concepts: Writing and Debugging Programs