cthagsctrl Command

Purpose

Controls the group services subsystem.

Syntax

cthagsctrl { -a [-p port-number ] -s-k-d-r-z-h-t-o }

Description

The cthagsctrl control command controls the operation of the group services subsystem (cthags) under the control of the system resource controller (SRC).

An instance of the group services subsystem runs on every node of a cluster.

From an operational point of view, the group services subsystem group is organized as follows:
Subsystem
group services
Subsystem group
cthags
SRC subsystems
cthags

The cthags subsystem is associated with the hagsd daemon.

The subsystem name on the nodes is cthags. There is one subsystem per node and each of these subsystems is associated with the cluster to which the node belongs.

Daemon
hagsd

Provides the group services functions.

In general, the cthagsctrl command is not issued from the command line. It is normally called by thecthactrl command during the creation of the cluster.

The cthagsctrl command provides a variety of controls for operating the group services subsystems:
  • Adding, starting, stopping, and deleting the subsystems
  • Cleaning up the subsystems (deleting them from the cluster)
  • Unconfiguring the subsystems from the cluster
  • Turning tracing on and off

Adding the subsystem

When the -a flag is specified, the control command adds the group services subsystems to the SRC. The control command:
  1. Makes sure the cthags subsystem is stopped.
  2. Gets the port number for the cthags subsystem from the cluster data.
  3. Removes the cthags subsystem from the SRC (in case it is still there).
  4. Adds the cthags subsystem to the SRC.
  5. Does not currently add an entry for the cthags group to the /etc/inittab file. As a result, cthags is required to be started by another subsystem when it is needed.

Starting the subsystem

When the -s flag is specified, the control command uses the startsrc command to start the group services subsystem, cthags.

Stopping the subsystem

When the -k flag is specified, the control command uses the stopsrc command to stop the group services subsystem, cthags.

Deleting or cleaning the subsystem

When the -d flag is specified, the control command uses the rmssys command to remove the group services subsystems from the SRC. The control command:
  1. Makes sure the cthags subsystem is stopped.
  2. Removes the cthags subsystem from the SRC using the rmssys command.
  3. Removes the port number from the /etc/services file.

Turning tracing on

When the -t flag is specified, the control command turns tracing on for the hagsd daemon using the traceson command.

Turning tracing off

When the -o flag is specified, the control command turns tracing off (returns it to its default level) for the hagsd daemon using the tracesoff command.

Refreshing the subsystem

The -r flag refreshes the cthags subsystem.

Logging

While they are running, the group services daemons provide information about their operation and errors by writing entries in three log files in the /var/ct/cluster_name/log/cthags directory. The log files are:
  • /var/ct/cluster_name/log/cthags_nodenum_instnum.cluster_name
  • /var/ct/cluster_name/log/cthags_nodenum_instnum.cluster_name.long
  • /var/ct/cluster_name/log/cthags.default.nodenum_instnum

The log files contain the log of the hagsd daemons on the nodes.

The log file names include these variables:
  • nodenum is the node number on which the daemon is running.
  • instnum is the instance number of the daemon.
  • cluster_name is the name of the cluster in which the daemon is running.

Each daemon limits the log size to a pre-established number of lines. The default is 5000 lines. 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.

Flags

-a [-p port number]
Adds the subsystem.
-s
Starts the subsystem.
-k
Stops the subsystem.
-d
Deletes the subsystem.
-t
Turns tracing on for the subsystem.
-o
Turns tracing off for the subsystem.
-r
Refreshes the subsystem.
-z
Uninstalls the cthags subsystem.
-h
Writes the command's usage statement to standard output.

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 peer domain only.

Use this command only under the direction of the IBM® Support Center.

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

  1. To add the group services subsystems to the SRC in the current cluster, enter:
    cthagsctrl -a
  2. To add the group services subsystems with a port number of 12347, enter:
    cthagsctrl -a -p 12347
  3. To start the group services subsystems in the current cluster, enter:
    cthagsctrl -s
  4. To stop the group services subsystems in the current cluster, enter:
    cthagsctrl -k
  5. To delete the group services subsystems from the SRC in the current cluster, enter:
    cthagsctrl -d
  6. To turn tracing on for the group services daemon in the current cluster, enter:
    cthagsctrl -t
  7. To turn tracing off for the group services daemon in the current cluster, enter:
    cthagsctrl -o

Location

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