[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2

grpsvcsctrl Command

Purpose

Starts the group services subsystems.

Syntax

grpsvcsctrl { -a | -s | -k | -d | -c | -u | -t | -o | -r | -h }

Description

The grpsvcsctrl command starts the group services subsystems. This 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 grpsvcs. A daemon is associated with each subsystem. From an operational point of view, the group services subsystem group is organized as follows:

Subsystem
group services
Subsystem group
grpsvcs
SRC subsystem
grpsvcs

The grpsvcs subsystem is associated with the hagsd daemon. The subsystem name on the nodes is grpsvcs. The grpsvcs subsystem on each node is associated with the cluster to which the node belongs.

Daemon
hagsd

The hagsd daemon provides the majority of the group services functions.

The grpsvcsctrl script is not normally run from the command line. It is normally called by the startup command during installation of the cluster.

The grpsvcsctrl script provides a variety of controls for operating the group services subsystems:

Before performing any of these functions, the script obtains the current cluster name.

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:

  1. It makes sure that both the grpsvcs and grpsvcsglsm subsystems are stopped.
  2. It gets the port number for the grpsvcs subsystem for this cluster from the global ODM and makes sure the port number is set in the /etc/services file. The range of valid port numbers is 10000 to 10100, inclusive.
  3. The service name that is entered in the /etc/services file is grpsvcs.cluster_name.
  4. It removes the grpsvcs and grpsvcsglsm subsystems from the SRC (in case they are still there).
  5. It adds the grpsvcs and grpsvcsglsm subsystems to the SRC. The cluster name is configured as a daemon parameter on the mkssys command.

Starting the subsystem: When the -s flag is specified, the control script uses the startsrc command to start the group services subsystems, grpsvcs and grpsvcsglsm.

Stopping the subsystem: When the -k flag is specified, the control script uses the stopsrc command to stop the group services subsystems, grpsvcs and grpsvcsglsm.

Deleting the subsystem: When the -d flag is specified, the control script uses the rmssys command to remove the group services subsystems from the SRC. The control script operates as follows:

  1. It makes sure that both the grpsvcs and grpsvcsglsm subsystems are stopped.
  2. It removes the grpsvcs and grpsvcsglsm subsystems from the SRC using the rmssys command.
  3. It removes the port number from the /etc/services file.

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:

  1. It stops all instances of subsystems in the subsystem group in all partitions, using the stopsrc -g grpsvcs command.
  2. It removes all instances of subsystems in the subsystem group in all partitions from the SRC using the rmssys command.

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.

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. 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
Adds the subsystem.
-s
Starts the subsystems.
-k
Stops the subsystems.
-d
Deletes the subsystems.
-c
Cleans the subsystems (that is, deletes them from all system partitions).
-u
Removes the group services subsystem from all partitions.
-t
Turns tracing on for the subsystems.
-o
Turns tracing off for the subsystems.
-r
Refreshes the subsystem.

The -r flag has no effect for this subsystem.

-h
Writes the script's usage statement to standard output.

Security

You must be running with an effective user ID of root.

Exit Status

0
Indicates the successful completion of the command.
1
Indicates that an error occurred.

Restrictions

This script is valid in an HACMP 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

  1. To add the group services subsystems to the SRC, enter:

    grpsvcsctrl -a
  2. To start the group services subsystems, enter:

    grpsvcsctrl -s
  3. To stop the group services subsystems, enter:

    grpsvcsctrl -k
  4. To delete the group services subsystems from the SRC, enter:

    grpsvcsctrl -d
  5. To clean up the group services subsystems, enter:

    grpsvcsctrl -c
  6. To turn tracing on for the group services daemon hagsd, enter:

    grpsvcsctrl -t
  7. To turn tracing off for the group services daemon hagsd, enter:

    grpsvcsctrl -o

Location

/usr/sbin/rsct/bin/grpsvcsctrl
Contains the grpsvcsctrl script

Files

/var/ha/log/grpsvcs_nodenum_instnum.cluster_name
Contains the log of the hagsd daemons on the nodes

The file name includes 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

Related Information

Commands: lssrc, startsrc, stopsrc

Daemons: hagsd

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]