ctmdbcheck
The ctmdbcheck utility displays information about the memory capacity and the status of the Control-M/Server database.
You can run the ctmdbcheck utility as a cyclic job.
If the -n switch is specified in the ctmdbcheck command, only database capacity information is returned, and the database integrity and thresholds are not checked.
For performance reasons, run the ctmdbcheck utility during non-peak hours or when Control-M/Server is down. If you need to determine database sizes frequently, use the ctmdbused utility, which displays the size (in MB) of the data and log components of the database plus the amount and percentage of space that is currently used in each component.
Running the ctmdbcheck Utility
This procedure describes how to run the ctmdbcheck utility, which displays information about the memory capacity and status of the Control-M/Server database.
Begin
-
Do one of the following:
-
UNIX: Log in to a Control-M/Server account.
-
Windows: Open a command prompt where Control-M/Server is installed.
-
-
Do one of the following:
-
Run the following command:
ctmdbcheck
-
To monitor the database and transaction log, run one of the following commands, based on the database:
-
Oracle and PostgreSQL: ctmdbcheck <generalThreshold%>
You can only check data usage may on existing Oracle databases.
Copyctmdbcheck 20
db total = 47757170 KB
data used = 6633 KB (0.01%)
Checking database...
Database is OK -
MSSQL: ctmdbcheck [-d <dbThreshold%>] [-l <logThreshold%>][-n]
These commands send a notification to Control-M/Server if more than the specified percentage of the database or the database transaction log is full. This notification can then be used to trigger actions that extend the appropriate Control-M/Server database component.
-
ctmdbcheck Utility Parameters
The following table describes the ctmdbcheck parameters.
Parameter |
Description |
---|---|
<dbThreshold%> |
Defines the Control-M/Server database utilization threshold. If the space utilized on the database exceeds the defined threshold, a notification is sent to Control-M This parameter must be preceded by the -d switch. -d80 indicates that a notification is sent when the database is over 80% full. |
<logThreshold%> |
Defines the transaction log utilization threshold of the Control-M/Server database. If the transaction log on the Control-M/Server database exceeds the defined threshold, a notification is sent to Control-M This parameter must be preceded by the -l switch. -l80 indicates that a notification is sent when the transaction log is over 80% full. |
<generalThreshold%> |
Checks Control-M/Server database data and log partitions by the same percentage. If the Control-M/Server database data or transaction log utilization exceeds 80%, ctmdbcheck 80 sends a notification. |
ctmdbcheck Utility Examples
-
ctmdbcheck 50
The generalThreshold% option parameter defines the same percentage for both the database and log utilization. In this example, if either the database or log utilization exceeds 50%, ctmdbcheck 50 sends a notification.
-
ctmdbcheck -d10
ctmdbcheck Utility Output Parameters
The ctmdbcheck utility returns information about the Control-M/Server database.
The following table describes the fields that are returned by this utility:
Field |
Description |
---|---|
db total |
Indicates the total memory (in KB) allocated for the database. |
data |
Indicates the total memory (in KB) allocated to the data partition of the database. |
log |
Indicates the total memory (in KB) allocated to the log partition of the database. |
Data used |
Indicates the total memory currently used in the data partition. |
Log used |
Indicates the total memory currently used in the log partition. |
In addition to the above fields, ctmdbcheck also returns one of the following messages that describes the current database status:
-
Database is OK.
-
WARNING: Database is more than half full.
-
ATTENTION: Database log segment is more than 90% full.
-
ATTENTION: Database is more than 80% full.
ctmdbcheck Utility Output Example
-
The following example describes a sample output:
Copydb master total = 20000.0 KB
data used = 4334 KB (21%) -
If the data used is more than 80% of the size of the Control-M/Server master database, the utility output contains the following message:
CopyCAUTION - DB near capacity. Increase master DB size.
-
If the data used is more than 90%, the utility output contains the following message:
CopyURGENT - Not enough Master DB free space.
BMC recommends that you run this utility as a cyclic job that automatically generates an appropriate notification if the utility output contains the phrase DB near capacity or DB free space.