HP Perf Agent — Accessing Raw Data

Preparing HP Perf Agent Data for Staging

HP Performance Agent software captures enterprise systems management measurement data from Windows systems and many UNIX variants such as HP-UX, Sun OS/Solaris, IBM AIX, Tru 64 UNIX, and Linux. (HP Performance Agent software was formerly called OpenView Performance Agent.)
For information about the performance areas that are collected by HP Perf Agent, see HP Perf Agent and HP Reporter Adapters.

Extracting Data from HP Perf Agent

The log files that contain the performance data can be exported by using extract, an HP Performance Agent program. The extract program writes the performance data in binary format. This binary file is then used as input to SAS IT Resource Management.
The following list is a partial list of the options and arguments that can be used to specify how to run the extract command. For the complete list of options and arguments that are available, see the HP Performance Agent User's Manual.
-xp
exports the extracted data to the specified output file.
d
extracts all the data from a single day.
-f output-filename
specifies that the output is to be written to an output file that can be read directly into SAS IT Resource Management.
-gapdcnt
specifies the types of data to extract.
-i
specifies the extraction of logical system data for the host and any associated guest machines present in the virtual environment. If -i is not specified, the extraction can still work, but no logical system data is extracted.
Note: The -i option applies to the designated host machine in a virtual operating environment. At this time, the -i option applies to the following three platforms: HP-UX (virtual machine configuration), AIX (LPARs or logical partition configuration), and Linux (VMWARE ESX configuration).
-r export-template-filename
specifies the name of the export template file. This file governs the format that is used for the exported data.
Note: See the HP Performance Agent User's Manual for the Windows or for the UNIX operating systems for instructions about running the HP Extract command interactively in Guided mode. Running the command in this mode enables you to create an export-template-file that is used to generate the data that can be input to SAS IT Resource Management. SAS IT Resource Management expects the extracted data to be in a binary format. This format is specified when the export template file is created. The SAS IT Resource Management data model lists the tables and variables for the HP Perf Agent Adapter. The data model is available for review in the SAS IT Resource Management 3.7 Data Model. You can use the data model to specify the HP export function so that it produces a customized export template file that meets the needs of your site.
-v
generates verbose output report formats.
Verbose mode enables the echoing of commands and command results.

Example 1

The following command extracts all the data for yesterday (d-1). It exports the data to the output file that is named data.bin, using the template in a file that is named reptfile.mwr. The purge parameter specifies that any existing file is purged in order to make room for the new file. The gapdcnt option specifies that the following types of data are to be extracted and exported: global detail, application detail, process detail, disk device detail, configuration detail, netif detail, and transaction detail.
extract -xp d-1 -gapdcnt -r reptfile.mwr -f data.bin,purge -v  
The log file that is created by HP Performance Agent software can be input directly into SAS IT Resource Management. Alternatively, you can store multiple log files in a directory that can be input to SAS IT Resource Management.
It is advisable to put the extract command into a shell, bat, or Perl script that runs once a night by means of a scheduling tool. (Perl is an open-source programming language that can be used for data manipulation tasks.) Cron can be used for scheduling on UNIX systems, and Task Manager can be used on Windows operating systems. The extracted files from each server can then be transferred to a centralized location to be read by SAS IT Resource Management using the file transfer utility of your choice. Delete the older raw data files to preserve disk space.

Example 2

The following shell script runs on Linux and extracts yesterday's data into files that have date extensions as part of the name.
     $ cat /var/opt/perf/datafiles/itrm-extract/extract.sh 
     # shell script to do HPOV extracts 
     /opt/perf/bin/extract -xp d-1  -gapdcnt  \
        -l  /var/opt/perf/datafiles/logglob
\       -r  /var/opt/perf/reptfile.mwr \   
        -f  /var/opt/perf/datafiles/itrm-extract/server1-'date +%y%m%d'.bin, purge -v 
The output file that is generated by the preceding shell script is of the form server1-yymmdd.bin. (If yesterday's date is November 26, 2007, then the name of the output file is server1-071126.bin). The output file is placed in the directory that is located here: /var/opt/perf/datafiles/itrm-extract.
For more information about generating HP Perf Agent data files, see the HP Performance Agent User's Manual.