You can capture health snapshots
using the GET HEALTH
SNAPSHOT
command from the CLP. The command syntax supports
retrieval
of health snapshot information for the different object types monitored
by
the health monitor.
Important: The health monitor, health indicators, and related components have been deprecated and might be
removed in a future release. Health monitor is not supported in
Db2®
pureScale® environments.
For
more information, see Health monitor has been deprecated.
Before you begin
You must have an instance attachment to capture
a health snapshot.
If there is not an attachment to an instance, then a default instance
attachment
is created. To obtain a snapshot of a remote instance, you must first
attach
to that instance.
About this task
To capture a database health snapshot
using the CLP
Procedure
- From the CLP, issue the
GET HEALTH SNAPSHOT command with the required
parameters.
In the following example, a database
manager
level health snapshot is captured immediately after starting the
database
manager.
db2 get health snapshot for dbm
- For partitioned database
systems, you can capture a database snapshot
specifically for a certain partition or globally for all partitions.
To capture
a health snapshot for a database on a specific partition (for example,
partition
number 2), issue the following command:
db2 get health snapshot for db on sample at dbpartitionnum 2
To
capture a database snapshot for all applications on all partitions,
issue
the following command:
db2 get health snapshot for db on sample global
The
following command captures a health snapshot with additional detail,
including
the formula, additional information, and health indicator history:
db2 get health snapshot for db on sample show detail
- For collection state-based
health indicators, you can capture a
database snapshot for all collection objects, regardless of state.
The regular
GET HEALTH SNAPSHOT FOR DB command returns all collection objects
requiring
an alert for all collection state-based health indicators.
To
capture a health snapshot for a database with all collection objects
listed,
issue the following command:
db2 get health snapshot for db on sample with full collection