grpsvcsctrl Command
Purpose
Starts the group services subsystems.
Syntax
grpsvcsctrl { -a │ -s │ -k │ -d │ -c │ -u │ -t │ -o │ -h }
Description
- 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.
- Adding, starting, stopping, deleting, and cleaning up the subsystems
- Turning tracing on and off
- 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.
- 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.
- 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.
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.
- -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
- To add the group services subsystems to the SRC, enter:
grpsvcsctrl -a
- To start the group services subsystems, enter:
grpsvcsctrl -s
- To stop the group services subsystems, enter:
grpsvcsctrl -k
- To delete the group services subsystems from the SRC, enter:
grpsvcsctrl -d
- To clean up the group services subsystems, enter:
grpsvcsctrl -c
- To turn tracing on for the group services daemon hagsd, enter:
grpsvcsctrl -t
- To turn tracing off for the group services daemon hagsd, enter:
grpsvcsctrl -o
Location
- /opt/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
- 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
Implementation Specifics
This command is part of the Reliable Scalable Cluster Technology (RSCT) fileset.