Sysload: How to rename history files

Document ID : KB000104535
Last Modified Date : 05/07/2018
Show Technical Document Details
Question:
How to rename History files in Sysload ?
Answer:

Rename the Server in a History File: "sld_rename"

The hostname is recorded in Agent history files (activity and Alerts).
When a Server is renamed, it is necessary to adjust the hostname in the history files to maintain coherence.

Rename

The procedure is as follows:

  • Open a command window
  • Make sure Agent Collector and File Server are not running
  • Check that no Agent processes are running
  • Go to the "<SYSLOAD>/tools" directory
  • Run the following command:
Example on Unix: sld_rename -hst_file /usr/local/sysload/moon_hst -new_node sun
Example on Windows: sld_rename -hst_file "C:\Program Files\sysload\History\Alert" -new_node sun
  • Start Agent Collector
  • Check the Agent Collector log file to make sure it started correctly
  • Start the File Server

Example of renaming and specifying history file: AIX
 

$ ./sld_rename -new_node aix800 -hst_dir /usr/local/sysload/tools/StData

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

Sysload history prefix (ex: StActivity / StProcesses) [ StProcesses ] :

Enter current agentname : frstaix612

Enter new agentname : aix800

$

$ ls -l ./StData

total 316000

-rw-r--r--    1 sysload  sysload    54637500 02 avr 23:59 StActivity_frstaix612_UNIX_0_20130402.dat

-rw-r--r--    1 sysload  sysload       76640 02 avr 23:59 StActivity_frstaix612_UNIX_0_20130402.idx

-rw-r--r--    1 sysload  sysload    79767418 03 avr 15:29 StActivity_frstaix612_UNIX_0_20130403.dat

-rw-r--r--    1 sysload  sysload      113060 03 avr 15:29 StActivity_frstaix612_UNIX_0_20130403.idx

-rw-r--r--    1 sysload  sysload    12355444 03 avr 15:30 StProcesses_aix800_UNIX_0_20130402.dat

-rw-r--r--    1 sysload  sysload       76640 03 avr 15:30

StProcesses_ aix800_UNIX_0_20130402.idx

-rw-r--r--    1 sysload  sysload    14623804 03 avr 15:30 StProcesses_aix800_UNIX_0_20130403.dat

-rw-r--r--    1 sysload  sysload      113060 03 avr 15:30 StProcesses_aix800_UNIX_0_20130403.idx

The term "finegrained" is used to specify "short-term" history

Tops history files do not refer to the hostname, there is therefore no need to run the "sld_rename" on them. 
When referring to history files, do not provide file extensions (.dat, .idx).
sld_rename alters host references in the history files. It does not rename the actual history file.
-Rename the history file to maintain coherence between the history file name and its contents.
-Change the value of the "node" variable in the collector configuration file.
-Run an automatic update of the Agent on the Management Server from the Sysload Analyst Console.

Additional Information:

Usage of sld_rename

Parameter

Use

Mandatory/Optional

-hst_file

Path to history file

Mandatory

-new_node

New host name

Mandatory

-new_agent

A new Agent name for example instances, like the name of a VMware cluster

Optional

-old_agent

Name of the Agent instance to be renamed

Optional

-new_agent

New Agent instance name

Optional

-mode

Used to specify mode, either interactive or silent

Optional

-hst_dir

Used to specify the directory that contains short term history files

Optional

-basename_prefix

Type of Short term history (StActivity/StProcesses)

Optional

Documentation about Sysload History Tools is available here