Accessing Raw Data for HP Perf Agent

Preparing HP Perf Agent Data for Staging

HP Performance Agent software, formerly OpenView Performance Agent, 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.
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 OpenView 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: Only data that was logged by HP Perf Agent for Windows NT/2000 can be configured and modified for use by export templates. Export templates cannot be used on any other platforms.
-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 at: /var/opt/perf/datafiles/itrm-extract.
For more information about generating HP Perf Agent data files, see the HP OpenView Performance Agent User's Manual.