Tag Archive | db2fmcd

DB2 Fault Monitor


Available on UNIX based systems only, DB2 fault monitor facilities keep DB2 databases up and running by monitoring DB2 database manager instances, and restarting any instance that exits prematurely.
The Fault Monitor Coordinator (FMC) is the process of the Fault Monitor Facility that is started at the UNIX boot sequence. The init daemon starts the FMC and will restart it if it terminates abnormally.
The FMC starts one fault monitor for each DB2 instance. Each fault monitor runs as a daemon process and has the same user privileges as the DB2 instance.
Once a fault monitor is started, it will be monitored to make sure it does not exit prematurely.
If a fault monitor fails, it will be restarted by the FMC. Each fault monitor will, in turn, be responsible for monitoring one DB2 instance. If the DB2 instance exits prematurely, the fault monitor will restart it. The fault monitor will only become inactive if the db2stop command is issued. If a DB2 instance is shut down in any other way, the fault monitor will start it up again.

Fault Monitor Coordinator Process
db2fmcd (Fault Monitor Coordinator Daemon (FMCD)),
db2fmd (Fault Monitor Daemon)
db2fm (Fault Monitor) processes running:

=============================================================
1) Check Fault Monitor Process
=============================================================

[dasusr1@mercury ~]$ ps -ef | grep db2fm

=============================================================
2) Enable the Fault Monitor Coordinator
=============================================================
>>Login as root

[root@mercury bin]# cd /opt/ibm/db2/V9.1/bin/
[root@mercury bin]# ./db2fmcu -u -p /opt/ibm/db2/V9.1/bin/db2fmcd
[root@mercury bin]# more /etc/inittab | grep fmc

This step adds an entry to the /etc/inittab so that the FMCD process will be started each time you reboot.
The entry will be similar to the following:
fmc:2345:respawn:/opt/IBM/db2/V8.1/bin/db2fmcd #DB2 Fault Monitor Coordinator

Screenshot: Enable the Fault Monitor Coordinator
db2fmcu

=============================================================
3) Start up the fault monitor daemon
=============================================================
Execute the command “db2fm -i instance_name -U” as root user

[root@mercury bin]# cd /opt/ibm/db2/V9.1/bin
[root@mercury bin]# ./db2fm -i db2inst1 -U

Screenshot: Start fault monitor daemon
db2fm
=============================================================
4) Start up the fault monitor service
=============================================================

Execute the command “./db2fm -i instance_name -u” as root user

[root@mercury bin]# cd /opt/ibm/db2/V9.1/bin
[root@mercury bin]# ./db2fm -i db2inst1 -u

Screenshot: Start up the fault monitor service
db2fm1
=============================================================
5) Turn on the fault monitor for the instance
=============================================================
Execute the command “./db2fm -i instance_name -f on” as root user

[root@mercury bin]# ./db2fm -i db2inst1 -f on

Screenshot : Start fault monitor for the instance
db2fm2
To confirm that fault monitor is no longer running for DB2INST1, type the following command on UNIX systems:

[root@mercury bin]# ps -ef|grep -i fm

=============================================================
6) Verify the fault monitor state
=============================================================
Log in as the instance owner, then perform the command: db2fm -s –S

[[db2inst1@mercury ~]$ db2fm -s -S

Screenshot: Verify the fault monitor state
db2fm3

Reboot the server. The fault monitor service should be available once the server has been rebooted

=============================================================
7) Verify the FMC Daemon state
=============================================================
>>Login as root
>>Verify the FMC Daemon state using the command:db2fmcu

[root@mercury bin]# ./db2fmcu

Screenshot: Verify the FMC Daemon state
db2fm4
Also check the process using “ps -ef grep db2 ”

These processes should be running
[root@mercury bin]# ps -ef | grep db2
dasusr1 5347 1 0 11:47 pts/1 00:00:00 /home/dasusr1/das/adm/db2dasrrm
root 5372 1 0 11:50 ? 00:00:00 /opt/ibm/db2/V9.1/bin/db2fmcd
dasusr1 5383 1 0 11:50 ? 00:00:00 /opt/ibm/db2/V9.1/das/bin/db2fmd -i
dasusr1 -m /opt/ibm/db2/V9. …….

Screenshot : Db2 Process
db2fm5