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 — 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 — 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:
- Adding, starting, stopping, deleting, and cleaning up the subsystems
- Turning tracing on and off
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:
- It makes sure the grpsvcs subsystem
is stopped.
- It gets the port number for the grpsvcs subsystem for this cluster from the global object data manager (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.
- The service name that is entered in the /etc/services file is grpsvcs.cluster_name.
- It removes the grpsvcs subsystem from
the SRC (in case it is still there).
- It adds the grpsvcs subsystem 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
subsystem, grpsvcs.
Stopping the
subsystem: When the -k flag is specified,
the control script uses the stopsrc command
to stop the group services subsystem, grpsvcs.
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:
- It makes sure the grpsvcs subsystem
is stopped.
- It removes the grpsvcs subsystem from
the SRC using the rmssys command.
- 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:
- It stops all instances of subsystems in the subsystem group in
all partitions, using the stopsrc -g grpsvcs command.
- 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.