Types of data commonly included in cleanups
Historical data from TrueSight Server Automation jobs and other objects
The TrueSight Server Automation data that consumes the most database space and grows most rapidly is historical data from TrueSight Server Automation jobs and other objects. Historical data is removed by the Delete cleanupHistoricalData command, which is called by the out-of-the-box cleanup job that BMC recommends that you run at least once a week. The exact object type to delete is specified as a variable of this command every time it runs.
The following table provides a summary of the various categories of historical data that you can delete in cleanup jobs:
Category | Description | ObjectType value (for cleanupHistoricalData) |
---|---|---|
Job schedules | Scheduling data of job runs. This data is stored in the SCHEDULE table and related tables. | JobSchedule |
Job results | Results from job runs, including the following job types:
| The following job type objects:
|
Job run events | Log messages from job runs. This data is stored in the JOB_RUN_EVENT table. | JobRunEvent |
Shared data | Generic assets and configuration objects created during the execution of Snapshot Jobs and Audit Jobs. Generic assets typically include configuration files, hardware information, processes, and daemons. | SharedData |
Audit trail | Records regarding users who requested authorization to perform actions on product objects. This data is stored in the AUDIT_TRAIL table. For more information about the audit trail, see Audit-Trail-view. | AuditTrail |
Database | Deletes older version of components that have no association with Snapshot, Audit, or Compliance modules. | OldVersionComponent |
Database | Deletes older version of jobs that have no runs associated with that version. | OldVersionJob |
Job data in the GUI
To help you understand the difference between the various types of job data, let's take a look at where each type of job data is displayed in the TrueSight Server Automation Console. The following figure shows the display of results for a job with multiple job runs.
Note the following elements:
- Job run data in the tree structure that appears in the left-hand part of the results includes job scheduling data.
- Job result data appears in the lower-level nodes of the tree structure and (mostly) in the tabular display on the right.
- Job run event data appears when you select the Show Log option for a job run.
- The audit trail for the job appears in the bottom left corner of the console.
Each type of data can be cleaned up separately. For example, you can delete old job run event data (job log messages) while still keeping job run schedules and results. In fact, this happens when job run event data is deleted based on a default retention period of 14 days, while job result data is deleted based on a job property that you set to the recommended retention period of 30 days. The following figure shows such a case, where job result data is present but job log messages have been cleaned up and are no longer present. The job run is the gatekeeper object - if it is soft-deleted, none of the other data will be visible in the GUI.
Shared objects
Another type of TrueSight Server Automation data that can consume a large amount of database space is shared objects. This is the data that is shared across multiple modules like ACL policies, configuration objects, and file contents for Snapshot Jobs and Audit Jobs. These shared objects accumulate rapidly especially if you run inventory snapshots (or any other environment-wide Snapshot Jobs or Audit Jobs) on a frequent basis.
Shared objects are removed from the database by the Delete hardDeleteAllSharedObjects command, which is called by the out-of-the-box cleanup job that BMC recommends that you run at least once a week.
Shared objects are cleaned up from the following database tables:
Database tables | Class | Type of data |
---|---|---|
BLFILE | SBLFile | References to depot objects, audit objects, and snapshot objects |
BL_ACL | SBlAcl | References to access control lists (ACLs) |
BL_VALUE | SBlValue | References to generic model objects. These are internal values generated by TrueSight Server Automation, such as values created for specific instances of a property class or a Depot object. |
BLFILE_CHECKSUM | SBLFileChecksum | Checksum file references |
Data on TrueSight Server Automation components
Data cleanup further involves the deletion of old data from several components of the TrueSight Server Automation environment. The following table provides a summary of the TrueSight Server Automation components for which cleanup commands are available, along with details about the data that is deleted and recommendations for how often to run these commands.
Component | BLCLI command | Details |
---|---|---|
Database | Delete cleanupDatabase | Deletes objects that have been previously marked for deletion (that is, objects that have been soft deleted), whether by deletion through the TrueSight Server Automation Console or by executing a retention policy for old data. The cleanupDatabase command is called by the out-of-the-box cleanup job, when run in TYPICAL mode or in CLEAN_DB mode. BMC recommends cleaning the database at least once a week. Note: Certain objects in the database are not deleted due to potential object dependencies. The cleanup process deletes all top-level model objects of the classes listed in the hk_allowed_classes database table, as well as all their child classes (which are not listed in this table). BMC recommends that you do NOT modify the contents of the hk_allowed_classes table. |
File Server | Delete cleanupFileServer | Deletes data that is no longer needed in the file server, including unused files from the file server and from temporary file storage on the Application Server. This data is stored in the FILE_LOCATION table. The cleanupFileServer command does not cleanup Depot Objects that use the AGENT_MOUNT or NSH_COPY_AT_STAGING location type as these are not considered to be under File Server management, even if the files actually reside on the File Server. Patches stored in a Patch Catalog are a common example of these types of Depot Objects. Before running the file server cleanup, ensure that the database cleanup (the cleanupDatabase command) has completed. In this way, you first remove objects from the database, and then you remove the actual underlying file system objects from the file server. The cleanupFileServer command is called by the out-of-the-box cleanup job, when run in TYPICAL mode or in CLEAN_FS mode. BMC recommends cleaning the file server at least once a week. |
Application Servers | Delete cleanupAllAppServerCaches | Deletes old temporary files stored in the cache on all Application Servers (the cleanupAllAppServerCaches command) or on a specific Application Server (the cleanupAppServerCache command), provided that the Application Servers are up and running (and accessible). Cleanup of Application Servers is not included in TYPICAL mode of the out-of-the-box cleanup job. Instead, these commands are called when you run the cleanup job in CLEAN_ALL_AS or CLEAN_AS mode, respectively. The recommended frequency for Application Server cleanup can vary, depending on your environment. For example, in the example of a standard weekly cleanup plan Application Server cleanup is planned to run on a monthly basis, and in the example cleanup plan for large operational environments Application Server cleanup is planned to run on a daily basis. |
RSCD Agent | Delete cleanupAgent | Deletes old temporary files on a target server (agent). This includes old files that were created by Deploy Jobs in the Transactions directory (especially rollback files) and in the Staging directory. Cleanup of RSCD agents is not included in TYPICAL mode of the out-of-the-box cleanup job. Instead, this command is called when you run the cleanup job in CLEAN_AGENT mode. BMC recommends cleaning the RSCD Agents at least once a month. For best results, keep agent cleanup separate from database cleanup (for example, do not include these two types of cleanup jobs in one batch job). |
Repeater Server | Delete cleanupRepeater | Deletes old files from the staging directory of a repeater server. Cleanup of the repeater server is not included in TYPICAL mode of the out-of-the-box cleanup job. Instead, this command is called when you run the cleanup job in CLEAN_REPEATER mode. BMC recommends cleaning the repeater server at least once a month. For best results, keep the cleanup of the repeater server separate from database cleanup (for example, do not include these two types of cleanup jobs in one batch job). |