emsvcsctrl Command
Purpose
Starts the event management subsystem.
Syntax
emsvcsctrl [-a | -s | -k | -d | -c | -t | -o | -h ]
Description
emsvcsctrl is a control script that starts the event management subsystem. Event management is a distributed subsystem of RSCT that provides a set of high-availability services for the IBM® RS/6000® server. By matching information about the state of system resources with information about resource conditions that are of interest to client programs, it creates events. Client programs can use events to detect and recover from system failures, thus enhancing the availability of the system. The emsvcsctrl control script controls the operation of the Event Management subsystem. The subsystem is under the control of the System Resource Controller (SRC) and belongs to a subsystem group called emsvcs. A daemon is associated with each subsystem. The emsvcsctrl script also controls the operation of the AIX® Resource Monitor subsystem. The subsystem is under SRC control and also belongs to the emsvcs subsystem group. A daemon is associated with each subsystem.
- Subsystem
- Event Management
- Subsystem Group
- emsvcs
- SRC Subsystem
- The emsvcs subsystem is associated with the haemd daemon.
- emaixos
- The emaixos is associated with the harmad daemon.
- Daemons
- The haemd daemon provides the Event Management services. The harmad daemon is the resource monitor for AIX operating system resources.
The emsvcsctrl script is not normally executed from the command line. It is normally called by the HACMP/ES startup script command during installation of the system.
- Adding, starting, stopping, and deleting the subsystem
- Cleaning up the subsystems
- Turning tracing on and off
- It makes sure that the emsvcs and emaixos subsystems are stopped.
- It removes the emsvcs and emaixos subsystems from the SRC (just in case they are still there).
- It adds the emsvcs subsystem to the SRC.
- It adds the emaixos subsystem to the SRC.
- It adds haemrm group using the mkgroup command, if it does not already exist. Any errors that occur are written to a log file named /var/ha/log/em.mkgroup.
- It creates the /var/ha/lck/haem and /var/ha/soc/haem directories, if they don't already exist. Any errors that occur are written to a log file named /var/ha/log/em.mkdir.
- It copies the Event Management Configuration Database, (EMCDB) from its install location, /opt/rsct/install/config/em.HACMP.cdb to its run-time location, /etc/ha/cfg/em.HACMP.cdb. Any errors resulting from the copy are written to a log file named /var/ha/log/em.cp.
Starting the Subsystem: When the -s flag is specified, the control script uses the startsrc command to start the Event Management subsystem, emsvcs, and the AIX Resource Monitor subsystem, emaixos.
Stopping the Subsystem: When the -k flag is specified, the control script uses the stopsrc command to stop the Event Management subsystem, emsvcs, and the AIX Resource Monitor subsystem, emaixos.
- It makes sure that the emsvcs and emaixos subsystems are stopped.
- It removes the emsvcs and emaixos subsystems from the SRC using the rmssys command.
- It stops all instances of subsystems in the subsystem group by using the stopsrc -g emsvcs command.
- It removes all instances of subsystems in the subsystem group from the SRC using the rmssys command.
- It removes the Event Management Configuration Database (EMCDB) from its run-time location, /etc/ha/cfg/em.HACMP.cdb.
Turning Tracing On: When the -t flag is specified, the control script turns tracing on for the haemd daemon, using the haemtrcon command. Tracing for the harmad daemon is also enabled, using the traceson command.
Turning Tracing Off: When the -o flag is specified, the control script turns tracing off for the haemd daemon, using the haemtrcoff command. Tracing for the harmad daemon is also disabled, using the tracesoff command.
Logging: While it is running, the Event Management daemon normally provides information about its operation and errors by writing entries to the AIX error log. If it cannot, errors are written to a log file called /var/ha/log/em.default.cluster_name.
Flags
- -a
- Adds the subsystem.
- -s
- Starts the subsystem.
- -k
- Stops the subsystem.
- -d
- Deletes the subsystem.
- -c
- Cleans the subsystem.
- -t
- Turns tracing on for the subsystem.
- -o
- Turns tracing off for the subsystem.
- -h
- Displays usage information.
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 command is valid in an HACMP environment only.
Standard Error
This command writes error messages (as necessary) to standard error.
Examples
- To add the Event Management subsystem to the SRC, enter:
emsvcsctrl -a
- To start the Event Management subsystem, enter:
emsvcsctrl -s
- To stop the Event Management subsystem, enter:
emsvcsctrl -k
- To delete the Event Management subsystem from the SRC, enter:
emsvcsctrl -d
- To clean up the Event Management subsystem, enter:
emsvcsctrl -c
- To turn tracing on for the Event Management daemon, enter:
emsvcsctrl -t
- To turn tracing off for the Event Management daemon, enter:
emsvcsctrl -o
Location
- /opt/rsct/bin/emsvcsctrl
- Contains the emsvcsctrl script
Files
- /var/ha/log/em.default.cluster_name
- Contains the default log of the haemd daemon on the cluster named cluster_name.
- /var/ha/log/em.cp
- Contains a log of any errors that occurred while copying the Event Management Configuration Database.
- /var/ha/log/em.trace.cluster_name
- Contains the trace log of the haemd daemon on the cluster named cluster_name.
- /var/ha/log/em.mkgroup
- Contains a log of any errors that occurred while creating the haemrm group.
- /var/ha/log/em.mkdir
- Contains a log of any errors that occurred while creating the /var/ha/lck/haem and /var/ha/soc/haem directories.