Sysload: How to purge history files

book

Article ID: 104531

calendar_today

Updated On:

Products

CA Automic Sysload

Issue/Introduction

How to purge History files in Sysload ?

Cause

Important: If the File has already reached 2GB, the History File will be corrupted and will not be able to be repaired anymore.

In this case, you need to rename the History files (.dta and .idx) and restart the Agent so that new History files are created.

Environment

Release: Sysload
Component: 5.x and superior

Resolution

Purge Historical Data by Age

  • Stop the Agent Collector and the File Server
  • If applicable, delete previous backup files
  • Run the "sld_purge" command

Examples:

  • Keep the data for the last 365 days: sld_purge.exe -hst_file /usr/local/sysload/moon_hst -keep_days 365

  • Delete the data for November 2009: sld_purge.exe -hst_file /usr/local/sysload/moon_hst -begin_date 2009-11-01 -end_date 2009-11-30

  1. Start the Agent Collector and File Server
  2. Check that purge was executed correctly ( for example via a history chart)
  3. Delete the backup files if not needed

Example:

@echo off

rem script to launch SYSLOAD purge

rem Script version 1.00 (2 Feb. 2010)

 

set history_dir=c:\program files\SYSLOAD\history

set tools_dir=c:\program files\SYSLOAD\tools

set no_days=365

 

rem This script deals with history files of SYSLOAD System Agents only.

rem Delete previous history backup files

 

del "%history_dir%\activity_save.dat"

del "%history_dir%\activity_save.idx"

 

del "%history_dir%\alert_save.dat"

del "%history_dir%\alert_save.idx"

 

rem Stop SYSLOAD Collector and File Server

 

net stop "SYSLOAD Collector"

net stop "SYSLOAD FileServer"

 

rem Purge history of activities

 "%tools_dir%\sld_purge.exe" -hst_file "%history_dir%\activity" -keep_days %no_days%

 

rem Purge history of alerts

 "%tools_dir%\sld_purge.exe" -hst_file "%history_dir%\alert" -keep_days %no_days%

 

rem Purge history of tops

 "%tools_dir%\sld_purge.exe" -hst_file "%history_dir%\top" -keep_days %no_days%

 

rem Start SYSLOAD Collector and File Server

 

net start "SYSLOAD Collector"

net start "SYSLOAD FileServer"

Purge Instantiated Metrics from Activity History

Certain activity metrics are instantiated (for example disk D: on Windows). It may be required to remove all data concerning a particular instance of a metric from the activity history file. In this case the program "sld_purge.exe" becomes interactive.

The procedure is as follows:

  1. Stop Collector and File Server
  2. Run the following command: <SYSLOAD>/tools/sld_purge.exe -by_entity -hst_file <activity history basename> -save_file <backup basename>
  3. Answer the questions
  4. Check that the purge was successful
  5. Delete the backup files if necessary

Example:

D:\Program Files\sysload\tools>sld_purge -hst_file .\..\history\activity -by_entity

 

Sysload history type (longterm / finegrained) [ longterm ]:

Sysload history save filepath (without extension) [ D:\Program Files\sysload\tools\.\..\history\activity_save ]:

Enter RegEx for entity to purge 'processors Specific' (c/k) [ - ] :

Enter RegEx for entity to purge 'physical disks Specific' (d/n) [ - ] :

Enter RegEx for entity to purge 'logical disks Specific' (l/h) [ - ] :

Enter RegEx for entity to purge 'network interfaces Specific' (r/i) [ - ] : 

Enter RegEx for entity to purge 'NetBEUI Specific' (b/b) [ - ] :

Enter RegEx for entity to purge 'applications' (p/p) [ - ] : 

Enter RegEx for entity to purge 'files' (j/j) [ - ] :

Enter RegEx for entity to purge 'services' (w/w) [ - ] :

Enter RegEx for entity to purge 'SNA Connections' (n/o) [ - ] :

Enter RegEx for entity to purge 'SNA Logical Unit Sessions' (u/o) [ - ] :

Enter RegEx for entity to purge 'SPOOL QUEUES' (AFFFF/r2) [ - ] :

Enter RegEx for entity to purge 'META DISCSPE' (YFFFF/72) [ - ] :

Enter RegEx for entity to purge 'META UTNETSPE' (XFFFF/8K) [ - ] :

Enter RegEx for entity to purge 'META CPNETSPE' (VFFFF/72) [ - ] :

Enter RegEx for entity to purge 'META UTAPPLSPE' (ZFFFF/92) [ - ] :

Enter RegEx for entity to purge 'STORAGE ENTITY' (BFFFF/32) [ - ] :

Enter RegEx for entity to purge 'APPL ENTITY' (PFFFF/p2) [ - ] : .*

Enter RegEx for entity to purge 'USER ENTITY' (TFFFF/62) [ - ] :

Enter RegEx for entity to purge 'SERVICE ENTITY' (WFFFF/w2) [ - ] :

Enter RegEx for entity to purge 'SHAREDFILE ENTITY' (JFFFF/j2) [ - ] :

 

/usr/local/sysload/tools/sld_purge.exe -by_entity -hst_file <SYSLOAD>/moon_hst

As the program is interactive, it cannot be scheduled. All data for specified instances is deleted, it is not possible to apply a date filter. If nothing is to be purged in a domain, just press "enter" when asked. To purge something in the domain, enter a regular expression targeting the names of the instances to delete.

Examples:

To delete information about all disks:

Enter ".*" when asked the question about disks.

  1. Press "enter" on all other domains.
  2. To delete information on entities of the type Application "Oracle" and "Sara":
  3. Enter "^Oracle$|^Sara$" when asked the question about applications.
  4. Press "enter" on all other domains.
  5. To check if instances have been effectively deleted, generate a history chart. Deleted instances will no longer appear.

Additional Information

Purge History Data: "sld_purge"

Program to purge the history files for activities, Alerts and tops.

Usage of sld_purge

Parameter

Use

Mandatory or Optional

Default

-hst_file

Path to history file

Mandatory

 

-save_file

Path to save file

Optional

<basename>_save.idx and <basename>_save.dat

-keep_days

Number of days data to be kept. Mutually exclusive with begin and end date and by_entity parameters

Optional

 

-begin_date

YYYY-MM-DD

Mutually exclusive with the keep_days and by_entity parameters

Optional

 

-end_date

YYYY-MM-DD

Mutually exclusive with the keep_days and by_entity parameters

Optional

 

-by_entity

Engages interactive process to select the metric instance (e.g. name of disk) to be purged.

Mutually exclusive with begin and end date and keep_days parameters

 

Applies only to activity histories

History file basename - The history file names vary with the type of Agent. Consult the specific Agent User Manual for details.

Documentation about Sysload History Tools is available here