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

Commands Reference, Volume 2

emsvcsctrl Command

Purpose

Starts the event management subsystem.

Syntax

emsvcsctrl [-a | -s | -k | -d | -c | -t | -o | -r | -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. 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.

Instances of the Event Management and AIX Resource Monitor subsystems execute on each node in the HACMP/ES cluster. From an operational point of view, the Event Management subsystem group is organized as follows:

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.

The emsvcsctrl script provides a variety of controls for operating the Event Management subsystem:

Adding the Subsystem: When the -a flag is specified, the control script uses the mkssys command to add the Event Management and AIX Resource Monitor subsystems to the SRC. The control script operates as follows:

  1. It makes sure that the emsvcs and emaixos subsystems are stopped.
  2. It removes the emsvcs and emaixos subsystems from the SRC (just in case they are still there).
  3. It adds the emsvcs subsystem to the SRC.
  4. It adds the emaixos subsystem to the SRC.
  5. 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.
  6. 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.
  7. It copies the Event Management Configuration Database, (EMCDB) from its install location, /usr/sbin/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.

Deleting the Subsystem: When the -d flag is specified, the control script uses the rmssys command to remove the Event Management and AIX Resource Monitor subsystems from the SRC. The control script operates as follows:

  1. It makes sure that the emsvcs and emaixos subsystems are stopped.
  2. It removes the emsvcs and emaixos subsystems from the SRC using the rmssys command.

Cleaning Up the Subsystems: When the -c flag is specified, the control script stops and removes the Event Management 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 by using the stopsrc -g emsvcs command.
  2. It removes all instances of subsystems in the subsystem group from the SRC using the rmssys command.
  3. 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.

Refreshing the Subsystem: The -r flag has no effect for this subsystem. Note to Reviewers: if this is so, can't this flag be deleted from this man page?

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.
-r
Refreshes 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

  1. To add the Event Management subsystem to the SRC, enter:

    emsvcsctrl -a
  2. To start the Event Management subsystem, enter:

    emsvcsctrl -s
  3. To stop the Event Management subsystem, enter:

    emsvcsctrl -k
  4. To delete the Event Management subsystem from the SRC, enter:

    emsvcsctrl -d
  5. To clean up the Event Management subsystem, enter:

    emsvcsctrl -c
  6. To turn tracing on for the Event Management daemon, enter:

    emsvcsctrl -t
  7. To turn tracing off for the Event Management daemon, enter:

    emsvcsctrl -o

Location

/usr/sbin/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.

Related Information

Commands: haemtrcoff, haemtrcon, lssrc, startsrc, stopsrc

Daemons: haemd

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