ctmdbcheck
The ctmdbcheck utility displays information about the memory capacity and the status of the Control‑M/Server database.
The ctmdbcheck utility can be run as a cyclic job.
If the -n switch is specified in the ctmdbcheck command, only database capacity information is returned, and database thresholds and integrity 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 command. This command displays the size (in MB) of the data and log components of the database plus the amount and percentage of space currently that is 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 the 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 window where Control-M/Server is installed.
-
-
ctmdbcheck
Monitor the database and the transaction log using the ctmdbcheck utility with the following syntax according to the database in use.
-
For Oracle specify the following command:
ctmdbcheck <generalThreshold%>
Only data usage may be checked for existing Oracle databases.
-
For PostgreSQL, enter the following command:
ctmdbcheck <generalThreshold%>
-
For MSSQL enter the following command:
ctmdbcheck [-d <dbThreshold%>] [-l <logThreshold%>][-n]
Copyctmdbcheck 20
db total = 47757170 KB
data used = 6633 KB (0.01%)
Checking database...
Database is OKThese commands trigger a Shout message to Control-M/Server if more than the specified percentage of the database or the database transaction log are full. This message can then be used to trigger actions that will extend the appropriate Control-M/Server database component.
Enter one of the following the commands:
ctmdbcheck Utility Parameters
The following table describes the ctmdbcheck parameters:
Parameter |
Description |
---|---|
<dbThreshold%> |
Defines the threshold for usage of the Control‑M/Server database. If more than the specified percentage of the database is full, a Shout message to Control‑M/EM warns that the database should be extended. This variable must be preceded by the -d switch. For example, -d80 indicates that a shout message should be issued if the database is more than 80% full. |
<logThreshold%> |
Defines the threshold for usage of the transaction log of the Control‑M/Server database. If more than the specified percentage of the database is full, a Shout message to Control‑M/EM warns that the transaction log should be extended. This variable must be preceded by the -l switch. For example, -l80 indicates that a shout message should be issued if the transaction log is more than 80% full. |
<generalThreshold%> |
Checks data and log partitions of the Control‑M/Server database by the same percentage. For example, if percent usage of either the data area or the transaction log exceeds 80%, ctmdbcheck 80 triggers a Shout message). |
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 describing 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 Examples
These examples use the ctmdbcheck utility to check database status without specifying any parameters—no Shout messages will be issued for this run on the utility even if the database is over the desired threshold.
-
ctmdbcheck 50
The general threshold % option specifies the same percentage for both the database and the log. In this example, if either the database or log exceeds 50%, ctmdbcheck 50 will trigger a shout message.
-
ctmdbcheck -d10
Oracle 817 database output:
CopyFolderspace Size % Free
-------------------- ------- -------
RBS 200M 85%
WIN613O 150M 95%
WIN613O_INDX 50M 98%
-
ctmdbcheck -d10
Oracle 92 Database output:
CopyFolderspace Size % Free
-------------------- ------- -------
CTRLM 250M 96%
TEMP 100M 90%
RBS 300M 99%
ctmdbmused Utility Example
The following example describes a sample output:
db 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 message:
CAUTION - DB near capacity. Increase master DB size.
If the data used is more than 90%, the utility output contains the message:
URGENT - Not enough Master DB free space.
BMC recommends running this utility as a cyclic job that automatically generates an appropriate Shout message if the utility output (OUTPUT) contains the phrase "DB near capacity" or "DB free space".