Sysload: How to rebuild history files

Document ID : KB000103824
Last Modified Date : 04/07/2018
Show Technical Document Details
Introduction:
You may need to rebuild Sysload history data files when history files are damaged or some errors related to a history data file appear in the Agent log.

Example of errors: 
[hist] *** Error in file '/opt/sysload/agentname_hst.dat'; file header () is INCORRECT 
[LPtrVerif] OBtFile.c[5029] - Error
[hist] *** ERROR [OBtFile_SearchAndAddOrUpdate] in OBtFile_AddNewRecord_Dat 
 
Question:

Rebuild a History File: "sld_rebuild"

Program to rebuild the history files (Activities, Alerts and Tops)

Usage of sld_rebuild

Parameter

Use

Mandatory/Optional

Default

-hst_file

Path to history file

Mandatory

 

-save_file

path to save file

Optional

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

Answer:

Rebuild History Files

  • Stop Agent Collector
  • Check there are no running processes
  • Stop File Server
  • Check there are no running processes
  • If applicable, delete former backup files
  • Run the following command from the <SYSLOAD>/tools directory: 
sld_rebuild -hst_file <SYSLOAD>/<history_file_name> [ -save_file <temp_directory_path>/<backup_basename> ]
*Note: history_file_name is the name of the related history file without the extension (without .dat or .idx)
  • Check the rebuild was successful by looking at the rebuild log file (file "<SYSLOAD>/tools/sldrebuild.log")
  • Start Agent Collector and File Server
  • Delete backup files if necessary

Examples on Unix

  • Rebuild history files of Activities, take default path for backup filessld_rebuild -hst_file /usr/local/sysload/agentname_hst
  • Rebuild history files of Alerts, force backup file to be stored in '/tmp'sld_rebuild -hst_file /usr/local/sysload/agentname_hstevnt -save_file /tmp/agentname_hstevnt
  • Rebuild history files of Tops: sld_rebuild -hst_file /usr/local/sysload/agentname_hst-top

Examples on Windows

  • Rebuild history files of Activities: sld_rebuild.exe -hst_file "C:\Program Files\sysload\history\activity"
  • Rebuild history file of Alerts: sld_rebuild.exe -hst_file "C:\Program Files\sysload\history\alert"
  • Rebuild history file of Top: sld_rebuild.exe -hst_file "C:\Program Files\sysload\history\activity-top"
Additional Information:
Documentation about Sysload History Tools is available here