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

Commands Reference, Volume 2

haemcfg Command

Purpose

Compiles the Event Management objects in the System Data Repository (SDR) and places the compiled information into a binary Event Management Configuration Database (EMCDB) file

Syntax

haemcfg [-c] [-n]

Description

The haemcfg command builds the Event Management Configuration Database (EMCDB) file for a system partition. If no flags are specified, the haemcfg command:

To place the new EMCDB into production, you must shut down and restart all of this system partition's Event Manager daemons: the daemon on the control workstation and the daemon on each of the system partition's nodes. When the Event Management daemon restarts, it copies the EMCDB from the staging directory to the production directory. The name of the production EMCDB is /etc/ha/cfg/em. syspar_name.cdb.

If you want to test a new EMCDB, IBM recommends that you create a separate system partition for that purpose.

You must create a distinct EMCDB file for each system partition on the IBM RS/6000 SP. To build an EMCDB file, you must be executing on the control workstation and you must set the SP_NAME environment variable to the appropriate system partition name before you issue the command.

Before you build or replace an EMCDB, it is advisable to issue the haemcfg command with the debugging flags.

The -c flag lets you check the validity of the Event Management data that resides in the SDR. This data was previously loaded through the haemloadcfg command. If any of the data is not valid, the command writes an error message that describes the error.

When the -c flag is processed, the command validates the data in the SDR, but does not create a new EMCDB file and does not update the EMCDB version string in the SDR.

The -n flag lets you build a test EMCDB file in the current directory. If anything goes wrong with the creation of the new file, the command writes an error message that describes the error.

When the -n flag is processed, the command uses the data in the SDR to create a test EMCDB file in the current directory, but it does not update the EMCDB version string in the SDR. If any of the data in the SDR is not valid, the command stops at the first error encountered.

If you specify both flags on the command line, the haemcfg command performs the actions of the -c flag.

After you have checked the data and the build process, issue the haemcfg command without any flags. This builds the new EMCDB file, places it in the /spdata/sys1/ha/cfg directory, and updates the EMCDB version string in the SDR.

Flags

-c
Indicates that you want to check the data in the System Data Repository (SDR) without building the Event Management Configuration Database (EMCDB).
-n
Indicates that you want to build a test copy of the EMCDB in the current directory.

Security

You must have write access to the SDR to run this command.

To place an EMCDB file for a system partition into the /spdata/sys1/ha/cfg directory, you must be running with an effective user ID of root on the control workstation. Before running this command, you must set the SP_NAME environment variable to the appropriate system partition name.

Exit Status

0
Indicates the successful completion of the command.
1
Indicates that an error occurred. It is accompanied by one or more error messages that indicate the cause of the error.

Restrictions

To place an EMCDB file for a system partition into the /spdata/sys1/ha/cfg directory, you must be running with an effective user ID of root on the control workstation. Before running this command, you must set the SP_NAME environment variable to the appropriate system partition name.

If you run the haemcfg command without any flags, the command stops at the first error it encounters. With the -c flag on, the command continues, letting you obtain as much debugging information as possible in one pass. To reduce your debugging time, therefore, run the command with the debugging flags first.

Standard Output

When the command executes successfully, it writes the following informational messages:

Reading Event Management data for partition syspar_name
 
CDB=new_EMCDB_file_name Version=EMCDB_version_string

Standard Error

This command writes error messages (as necessary) to standard error.

Errors can result from causes that include:

For a listing of the errors that the haemcfg command can produce, see RSCT Event Management Programming Guide and Reference.

Examples

  1. To validate the Event Management data in the System Data Repository (without creating a new EMCDB file), enter:
    haemcfg -c
    If there are any errors in the data, the command writes appropriate error messages.

    To fix the errors, replace the data in the SDR. For more information, see the haemloadcfg command.

  2. To create a test EMCDB file in the current directory, enter:
    haemcfg -n
    If there are any problems in creating the file, the command writes appropriate error messages.
  3. To compile a new EMCDB file for a system partition from the Event Management data that resides in the SDR and place it into the staging directory:
    1. Make sure you are executing with root authority on the control workstation.
    2. Make sure that the SP_NAME environment variable is set to the name of the appropriate system partition.
    3. Enter:
      haemcfg
      In response, the command creates a new EMCDB file, places it in the staging directory as /spdata/sys1/ha/cfg/em.syspar_name.cdb, where syspar_name is the name of the current system partition, and updates the EMCDB version string in the SDR.

Location

/usr/sbin/rsct/bin/haemcfg

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: haemloadcfg

For a description of the SDR classes and attributes that are related to the EMCDB, see RSCT Event Management Programming Guide and Reference.

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