Ovpa Users Guide Linux
Ovpa Users Guide Linux
Performance Agent
User’s Manual
Edition: 13
for UNIX
2
Contents
3
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Running the Utility Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Using Interactive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Example of Using Interactive and Batch Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Utility Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Example of Using the Command Line Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Utility Scan Report Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Scan Report Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Initial Parm File Global Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Initial Parm File Application Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Chronological Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
parm File Global Change Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
parm File Application Addition/Deletion Notifications. . . . . . . . . . . . . . . . . . . . . . 69
Scopeux Off-Time Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Application-Specific Summary Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Process Log Reason Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Scan Start and Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Application Overall Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Collector Coverage Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Log File Contents Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Log File Empty Space Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4. Utility Commands
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
analyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
checkdef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
logfile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
parmfile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4
Contents
quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
sh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5
Contents
6. Extract Commands
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
cpu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
filesystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
global. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
logfile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
lvolume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
monthly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
netif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
sh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
weekdays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
weekly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
yearly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
7. Performance Alarms
6
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Processing Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
How Alarms Are Processed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Alarm Generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Sending SNMP Traps to Network Node Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Sending Messages to OpenView Operations (OVO) . . . . . . . . . . . . . . . . . . . . . . . . . 210
Executing Local Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Errors in Processing Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Analyzing Historical Data for Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Examples of Alarm Information in Historical Data . . . . . . . . . . . . . . . . . . . . . . . 212
Alarm Definition Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Alarm Syntax Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Common Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
ALARM Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
ALERT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
EXEC Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
PRINT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
IF Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
LOOP Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
INCLUDE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
USE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
VAR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
ALIAS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
SYMPTOM Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Alarm Definition Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Customizing Alarm Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
7
Contents
A. Appendix
Viewing MPE Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Viewing and Printing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Viewing Documents on the Web. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Adobe Acrobat Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
8
Contents
9
Contents
10
Tables
11
Tables
12
Publication History
New editions are complete revisions of the manual. The publication dates
for each edition are listed below. This manual is not printed. It is
published in Adobe Portable Document File (.pdf) format and can be
viewed online and printed as needed. No part numbers were assigned for
Editions 4 and 5 and will not be assigned beginning with Edition 9.
Edition 4 07/00
Edition 5 12/00
Edition 9 01/02
Edition 10 05/02
Edition 11 09/02
Edition 12 12/02
Edition 13 01/03
13
14
Conventions
The following typographical conventions are used in this manual.
Table 1 Typographical Conventions
Italic Book or manual titles, and man page Refer to the HP OpenView
names Operations Administrator’s
Reference Volume I and the opc(1M)
manpage for more information.
Computer Text and items on the computer The system replies: Press Enter
screen
15
Table 1 Typographical Conventions (Continued) (Continued)
16
Revisions
The edition number on the title page of this document indicates the
edition of this document. The print date on the title page changes each
time this document is updated.
You will receive updated or new editions if you subscribe to the
appropriate product support service. Contact your HP sales
representative for details.
Table 2 Changes in this Document Edition
Chapter Changes
17
Table 2 Changes in this Document Edition (Continued)
Chapter Changes
18
Support
Please visit the HP OpenView web site at:
http://openview.hp.com/
There you will find contact information and details about the products,
services, and support that HP OpenView offers.
You can go directly to the HP OpenView eCare web site at:
http://support.openview.hp.com/
The eCare support site includes:
• Downloadable documentation
• Troubleshooting information
• Patches and updates
• Problem reporting
• Training information
• Support program information
19
20
1 This is OpenView Performance
Agent
Chapter 1 21
This is OpenView Performance Agent
Introduction
Introduction
This chapter is an introductory overview of OV Performance Agent, its
components, and related products. It discusses:
NOTE OV Performance Agent (OVPA) for UNIX in this document refers only to
version 4.0 and beyond, and OV Performance Manager (OVPM) refers to
version 4.0 and beyond for UNIX and Windows platforms. OVPM 3.x
(PerfView) will connect to OV Performance Agent 4.0 and beyond for all
UNIX platforms except for OVPA for Linux. In the future, connectivity to
OVPM 3.x will be discontinued.
22 Chapter 1
This is OpenView Performance Agent
What OV Performance Agent Does
Chapter 1 23
This is OpenView Performance Agent
OV Performance Manager Major Components
24 Chapter 1
This is OpenView Performance Agent
OV Performance Manager Major Components
NOTE Substantial changes were made to the internal data flow of metric data
in OVPA 4.0 and beyond releases. The coda daemon has replaced the
function of the perflbd and rep-server daemons, the datasources file
has replaced the perflbd.rc file, and the perfalarm daemon has
replaced alarmgen. The OVPM 3.x (PerfView) monitor interface has been
obsoleted; however, the external functionality is otherwise unchanged.
Chapter 1 25
This is OpenView Performance Agent
OV Performance Manager Major Components
Data Sources
OV Performance Agent uses the coda daemon to provide log file data to
the alarm generator and the OV Performance Manager analysis product.
There is one coda server for all data sources including scopeux and DSI
log files.
26 Chapter 1
This is OpenView Performance Agent
OV Performance Manager Major Components
You configure data sources in the datasources file that resides in the
var/opt/OV/conf/perf/ directory. This allows you to selectively make
data available for alarm processing and analysis.
NOTE Previous versions of OVPA 3.x and earlier, used a DCE-based facility to
serve data for analysis.
Chapter 1 27
This is OpenView Performance Agent
Related Performance Products
28 Chapter 1
This is OpenView Performance Agent
Related Performance Products
For more information about any of these products, see the product
documentation on the HP OpenView Manuals web site at:
http://ovweb.external.hp.com/lpe/doc_serv
Select <product name> from the product list box, select the release
version, and click [Search].
Chapter 1 29
This is OpenView Performance Agent
Related Performance Products
30 Chapter 1
2 Managing Data Collection
Chapter 2 31
Managing Data Collection
Introduction
Introduction
This chapter tells you how to manage the following data collection
activities that are involved in using OV Performance Agent.
32 Chapter 2
Managing Data Collection
Scopeux Data Collector
Scopeux Status
The /var/opt/perf/status.scope file serves as a status/error log for
the scopeux process. New information is appended to this file each time
the scopeux collector is started, stopped, or when a warning or error is
encountered. To view the most recent status and error information from
scopeux, use the perfstat -t command.
Chapter 2 33
Managing Data Collection
parm File
parm File
The parm file is a text file containing the instructions that tell scopeux to
log specific performance measurements. The latest default parm file is
installed with OV Performance Agent in the /opt/perf/newconfig/
directory (/usr/lpp/perf/newconfig/ on IBM AIX) and is copied into
the /var/opt/perf/ directory during installation if one does not
already exist from a previous installation. scopeux reads the
/var/opt/perf/parm file when it starts up.
If you haven't run the product before, you can use the
/var/opt/perf/parm file to become familiar with the type of data
collected. The default values for each parameter are explained in the
parm file.
Once you are familiar with the OV Performance Agent environment, you
should tailor the /var/opt/perf/parm file to your performance data
collection needs.
The parm file is set up to collect an average amount of log file data. The
maximum amount depends on your system. For more information, see
“Disk Space” in Chapter 1 of your HP OpenView Performance Agent
Installation & Configuration Guide. Also see the description of the size
parameter in “Parameter Descriptions” on page 37.
If you already have experience with OV Performance Agent and are
familiar with the parm file parameters, you might want to modify this file
before starting the scopeux collector.
• Any parameter you specify overrides a default. See the parm file for
the default values.
• The order in which the parameters are entered into the parm file is
not important except as follows:
34 Chapter 2
Managing Data Collection
parm File
• Set maximum amount of disk space for the raw scopeux log files.
• Specify which data types are logged.
• Specify attributes of processes to be logged.
• Define types of performance data to be collected and logged.
• Specify what user-definable sets of applications should be monitored.
An application can be one or more programs that are monitored as a
group.
• Specify when scopeux should perform daily log file maintenance
activities so that they do not impact system availability.
You can modify these parameters to tell scopeux to log measurements
that match the requirements of your particular system (see “Modifying
the parm File” on page 34).
Chapter 2 35
Managing Data Collection
parm File
The parm file parameters listed in Table 2-1 are used by scopeux. Some
of these parameters are for specific systems as indicated in the table. For
detailed descriptions of these parameters, see “Parameter Descriptions”
on page 37 and “Application Definition Parameters” on page 42.
NOTE The items in the following table that are applicable only to HP-UX are
described in detail in Chapter 2 of the HP OpenView Performance Agent
Installation & Configuration Guide for HP-UX.
id system ID
log all
global
application [=prm] [=all]
([=prm] onHP-UX only)
process
device=disk,lvm,cpu,filesystem,all
(lvm on HP-UX only)
transaction=correlator,resource
(resource on HP-UX only)
threshold cpu=percent
disk=rate (not on Linux or Windows)
memory=nn (values in MBs)
nonew
nokilled
shortlived= [TRUE|FALSE]
36 Chapter 2
Managing Data Collection
parm File
group = groupname [, ]
or
scopetransactions on
off
Parameter Descriptions
Following are descriptions of each of the parm file parameters.
• log global writes global records to the logglob file. You must have
global data records to view and analyze performance data on your
system. Global metrics are not affected by logging options or values
of application or process data.
Chapter 2 37
Managing Data Collection
parm File
38 Chapter 2
Managing Data Collection
parm File
Chapter 2 39
Managing Data Collection
parm File
Threshold Options:
cpu Sets the percentage of CPU utilization that a process
must exceed to become “interesting” and be logged.
The value “percent” is a real number indicating
overall CPU use. For example, cpu=7.5 indicates that a
process is logged if it exceeds 7.5 percent of CPU
utilization in a 1-minute sample.
disk (Not available on Linux or Windows). Sets the rate of
physical disk I/O per second that a process must exceed
to become “interesting” and be logged.
The value is a real number. For example, disk=8.0
indicates that a process will be logged if it exceeds
eight physical I/Os per second average in a 1-minute
sample.
memory Sets the memory threshold that a process must exceed
to become “interesting” and be logged.
The value is in megabyte units and is accurate to the
nearest 100KB. If set, the memory threshold is
compared with the value of the PROC_MEM_VIRT metric.
Each process that exceeds the memory threshold will
be logged, similarly to the disk and CPU process
logging thresholds.
nonew Turns off logging of new processes if they have not
exceeded any threshold. If not specified, all new
processes are logged. On HP-UX, if shortlived is not
specified, then only new processes that lasted more
than one second are logged.
nokilled Turns off logging of exited processes if they did not
exceed any threshold. If not specified, all killed (exited)
processes are logged. On HP-UX, if shortlived is not
specified, then only killed processes greater than one
second are logged.
shortlived Turns on logging of processes that ran for less than one
second in an interval. (This often significantly
increases the number of processes logged.) If scopeux
finds threshold shortlived in the parm file, it logs
shortlived processes, regardless of the cpu or disk
threshold, as long as the nonew and nokilled options
40 Chapter 2
Managing Data Collection
parm File
Size The size parameter is used to set the maximum size (in
megabytes) of any raw log file. You cannot set the size to be less than one
megabyte.
The scopeux collector reads these specifications when it is initiated. If
any of these log files achieve their maximum size during collection, they
will continue to grow until mainttime, when they will be rolled back
automatically. During a roll back, the oldest 25 percent of the data is
removed from the log file. Raw log files are designed to only hold a
Chapter 2 41
Managing Data Collection
parm File
WARNING Partial loss of old data will occur if logs are allowed to collect
more than 365 days of data. Please configure the parm file size
entry so that old data is rolled out before any of the log files
contain 365 days of data.
NOTE In PRM mode (for HP-UX only), active PRM groups are logged and the
user-defined application sets listed in the parm file are ignored.
42 Chapter 2
Managing Data Collection
parm File
NOTE Any process on the system belongs to only one application. No process is
counted into two or more applications. Processes are collected based on
program name, not program path. Therefore, two processes with the
same program name but different paths (file system locations) would be
bucketed into the same application.
Chapter 2 43
Managing Data Collection
parm File
application Prog_Dev
file vi,cc,ccom,pc,pascomp,dbx,xdb
application xyz
file xyz*,startxyz
You can have a maximum of 1000 file, 300 user, and 300 group
specifications for all applications combined. The previous example
includes nine file specifications. (xyz* counts as only one specification
even though it can match more than one program file.)
If a program file is included in more than one application, it is logged
in the first application that contains it.
The default /var/opt/newconfig/parm file contains some sample
applications that you can modify. The examples directory also
contains other samples (in a file called parm_apps) you can copy into
your parm file and modify as needed.
44 Chapter 2
Managing Data Collection
parm File
file = javac,java,jre,aCC,ctcom*,awk,gawk
application Mail
file = sendmail,mail*,*mail,elm,xmh
If you do not specify a file parameter, all programs that satisfy the
other parameters qualify.
If you want to bucket Java or shell programs into different applications,
you may want to look at the /opt/perf/examples/tools/procarg
script, which shows a way to start programs with a unique argv[0]
value.
NOTE The asterisk (*) is the only wild card character supported by the parm
file.
User The user parameter specifies which user login names belong to an
application.
For example:
application Prog_Dev
file vi,xb,abb,ld,lint
user ted,rebecca,test*
User specifications that include wildcards count as only one specification
toward the maximum of 1000 each for all file, 300 user, and 300 group
specifications.
If you do not specify a user parameter, all programs that satisfy the
other parameters qualify.
The name in the user parameter is limited to 15 characters in length.
Group The group parameter specifies which user group names belong
to an application.
For example:
application Prog_Dev_Group2
file vi,xb,abb,ld,lint
user ted,rebecca,test*
group lab, test
If you do not specify a group parameter, all programs that satisfy the
other parameters qualify.
Chapter 2 45
Managing Data Collection
parm File
46 Chapter 2
Managing Data Collection
parm File
NOTE The parm file is processed in the order entered and the first match of
program name and/or user login as well as group and priority (if used)
defines the application to which a particular process belongs.
The priority can be changed over the life of a process. The scheduler
adjusts the priority of time-share processes. You can also change
priorities programmatically or while executing.
The process priority is sampled at the end of each one-minute sample
interval. If the process has changed priority, it can change applications.
All activity for a process during the one-minute interval is assumed to
have occurred at the new priority and is attributed to the application
that matches the process at the end of each one-minute sample interval.
application Other_Editors
file ed,sed,awk
application Compilers
file cc,ccom,xlc,c++,fe,sh
application Users
user bruce,ted,julie,anna
Chapter 2 47
Managing Data Collection
parm File
vi bill Prog_Dev_Group1
vi mark Prog_Dev_Group2
cc gene Compilers
48 Chapter 2
Managing Data Collection
Stopping and Restarting Data Collection
Chapter 2 49
Managing Data Collection
Stopping and Restarting Data Collection
50 Chapter 2
Managing Data Collection
Effective Data Collection Management
• Each log file has a configured maximum size. Default maximum sizes
are provided when the OV Performance Agent is first installed.
However, you can reconfigure these values.
• As each log file reaches its maximum size, a “roll back” is performed
at mainttime by the scopeux data collector. During this roll back,
the oldest 25 percent of the data in the log file is removed to make
room for new data to be added.
Automatic log file maintenance is similar, but not identical, for data
collected by scopeux and by the DSI logging process. For more
information on DSI log file maintenance, see the HP OpenView
Performance Agent for UNIX Data Source Integration Guide.
Setting Mainttime
Normally, scopeux will only perform log file roll backs at a specific time
each day. This is to ensure that the operation is performed at off peak
hours and does not impact normal system usage. The time the log files
are examined for roll back is set by the mainttime parameter in the parm
file.
Chapter 2 51
Managing Data Collection
Effective Data Collection Management
52 Chapter 2
Managing Data Collection
Effective Data Collection Management
Chapter 2 53
Managing Data Collection
Effective Data Collection Management
Data Archiving
Automatic log file management keeps the latest log file data available for
analysis. It works on the raw log files. Process data is logged each minute
and all other data is logged every five minutes. To make room for new
data, older data is removed when the log files reach their maximum
sizes. If you want to maintain log file data for longer periods of time, you
should institute a data archiving process. The exact process you choose
depends on your needs. Here are a few possibilities:
• Size the raw log files to be very large and let automatic log file
maintenance do the rest. This is the easiest archiving method, but it
can consume large amounts of disk space after several months.
• Extract the data from the raw log files into extracted archive files
before it is removed from the raw log files. Formulate a procedure for
copying the archive files to long term storage such as tape until
needed.
• Extract only a subset of the raw log files into extracted archive files.
For example, you may not want to archive process data due to its
high volume and low time-value.
• Some combination of the preceding techniques can be used.
We recommend the following procedures for data archiving:
• Size the raw log files to accommodate the amount of detail data you
want to keep online.
• Once a week, copy the detailed raw data into files that will be moved
to offline storage.
54 Chapter 2
Managing Data Collection
Effective Data Collection Management
Hint
You can use the extract program to combine data from multiple
extracted files or to make a subset of the data for easier transport and
analysis.
For example, you can combine data from several yearly extracted files in
order to do multiple-year trending analysis. (See the description of the
yearly command in Chapter 6, “Extract Commands,” on page 145.)
CAUTION Moving log files that were created on a new version of OV Performance
Agent to a system using an older version of OV Performance Agent is not
supported.
Chapter 2 55
Managing Data Collection
Effective Data Collection Management
56 Chapter 2
3 Using the Utility Program
Chapter 3 57
Using the Utility Program
Introduction
Introduction
The utility program is a tool for managing and reporting information
on log files, the collection parameters (parm) file, and the alarm
definitions (alarmdef) file. You can use the utility program
interactively or in batch mode to perform the following tasks.
58 Chapter 3
Using the Utility Program
Running the Utility Program
Chapter 3 59
Using the Utility Program
Running the Utility Program
Errors and missing data are handled differently for interactive mode
than for command line and batch mode. You can supply additional data
or correct mistakes in interactive mode, but not in command line and
batch mode.
60 Chapter 3
Using the Utility Program
Using Interactive Mode
Chapter 3 61
Using the Utility Program
Using Interactive Mode
The results are the same whether you enter this command interactively
or from a batch job.
The first parameter–global–indicates the log file to be resized. If you do
not supply this parameter, the consequent action for interactive and
batch users would be the following:
• Batch users - the batch job would terminate because the logfile
parameter has no default.
• Interactive users - you would be prompted to choose which type of log
file to resize to complete the command.
The last parameter–yes–indicates that resizing will be performed
unconditionally.
If you do not supply the yes parameter, the consequent action for
interactive and batch users would be the following:
• Batch users - resizing would continue since yes is the default action.
• Interactive users - you would be prompted to supply the action before
resizing takes place.
NOTE Before using the resize command in either batch mode or interactive
mode, you must first stop OV Performance Agent. For details, see
“Stopping and Restarting Data Collection” on page 49 in Chapter 2.
62 Chapter 3
Using the Utility Program
Utility Command Line Interface
Command
Argument Description
Option
Chapter 3 63
Using the Utility Program
Utility Command Line Interface
Command
Argument Description
Option
EMPTY=nnn YES
SPACE=nnn NO
MAYBE
64 Chapter 3
Using the Utility Program
Utility Command Line Interface
Chapter 3 65
Using the Utility Program
Utility Scan Report Details
Initial Values
Chronological Detail
66 Chapter 3
Using the Utility Program
Utility Scan Report Details
Summaries
Chapter 3 67
Using the Utility Program
Scan Report Information
• Initial values
• Chronological details
• Summaries
Initial Values
This section describes the following initial values:
68 Chapter 3
Using the Utility Program
Scan Report Information
NOTE During the scan, you are notified of applications that were added or
deleted. Additions and deletions are determined by comparing the
spelling and case of the old application names to the new set of logged
application names. No attempt is made to detect a change in the
definition of an application. If an application with a new name is
detected, it is listed along with its new definition.
The date and time on this record is the last time scopeux was started
before logging the first application record currently in the log file.
Chronological Detail
This section describes the following chronological details:
Chapter 3 69
Using the Utility Program
Scan Report Information
NOTE Application definitions are not checked for changes. They are listed when
an application name is changed, but any change to an existing
application's definition without an accompanying name change is not
detected.
70 Chapter 3
Using the Utility Program
Scan Report Information
PERCENT OF TOTAL
Application Records CPU DISK TRANS
------------------- --------- ------ ------- ------
OTHER 22385 45.7% 20.9% 63.0%
Resource_Sharing 7531 6.0% 2.2% 17.1%
SPOOLING 13813 2.4% 0.3% 0.0%
ON_LINE_COMPILES 13119 2.9% 1.7% 0.1%
BATCH_COMPILES 8429 2.9% 0.1% 2.2%
ORDER_ENTRY 387 0.1% 0.0% 0.0%
ELECTRONIC_MAIL 6251 3.8% 1.3% 9.6%
PROGRAM_DEVELOPMENT 3141 9.1% 2.4% 0.6%
RESEARCH_DEPARMENT 3968 8.7% 2.0% 6.0%
BILL_OF_MATERIALS 336 0.6% 1.5% 0.1%
FINANCIALS 1080 5.0% 1.5% 0.5%
MARKETING_DEPT 2712 12.9% 67.3% 0.0%
GAMES 103 0.1% 0.0% 0.0%
-------------------- --------- ------ ------ ------
All user applications 73.1% 54.3% 79.1% 37.0%
Summaries
This section describes the following summaries:
Chapter 3 71
Using the Utility Program
Scan Report Information
72 Chapter 3
Using the Utility Program
Scan Report Information
Chapter 3 73
Using the Utility Program
Scan Report Information
Column Explanation
Type The general type of data being logged. One special
type, Overhead, exists:
Overhead is the amount of disk space occupied (or
reserved) by the log file versus the amount actually
used by the scanned data records.
If less than the entire log file was scanned, Overhead
includes the data records that were not scanned. If the
entire file was scanned, Overhead accounts for any
inefficiencies in blocking the data into the file plus any
file-access support structures.
It is normal for extracted log files to have a higher
overhead than raw log files since they have additional
support structures for quicker positioning.
Total The total record count and disk space scanned for each
type of data.
Each Full Day The number of records and amount of disk space used
for each 24-hour period that scopeux runs.
74 Chapter 3
Using the Utility Program
Scan Report Information
Dates The first and last valid dates for the data records of
each data type scanned.
Full Day The number of full (24-hour) days of data scanned for
this data type. Full Days may not be equal to the
difference between the start and stop dates if scopeux
coverage did not equal 100 percent of the scanned time.
The TOTAL line (at the bottom of the listed data) gives you an idea of
how much disk space is being used and how much data you can expect to
accumulate each day.
The amount of room available for more data is calculated based on the
amount of unused space in the file and the scanned value for the number
of megabytes of data being logged each 24-hour day (see “Log File
Contents Summary”). If the megabytes-scanned-per-day values appear
unrealistically low, they are replaced with default values for this
calculation.
If you scan an extracted file, you get a single report line because all data
types share the same extracted file.
Chapter 3 75
Using the Utility Program
Scan Report Information
76 Chapter 3
4 Utility Commands
Chapter 4 77
Utility Commands
Introduction
Introduction
This chapter describes the utility program's commands. It includes a
syntax summary and a command reference section that lists the
commands in alphabetical order.
Utility commands and parameters can be entered with any
combination of uppercase and lowercase letters. Only the first three
letters of the command name are required. For example, the logfile
command can be entered as logfile or it can be abbreviated as log or
LOG.
Examples of how these commands are used can be found in online help
for the utility program.
The table on the next pages contains a summary of utility command
syntax and parameters.
78 Chapter 4
Utility Commands
Introduction
Command Parameter
analyze
detail on
off
exit
e
guide
list filename or *
logfile logfile
menu
?
parmfile parmfile
quit
q
resize global
application
process
device
transaction
days=maxdays
size=max MB
empty=days
space=MB
yes
no
maybe
scan logfile
(Operation is also affected by the list,
start, stop, and detail commands.
show all
Chapter 4 79
Utility Commands
Introduction
Command Parameter
sh system command
!
80 Chapter 4
Utility Commands
analyze
analyze
Use the analyze command to analyze the data in a log file against alarm
definitions in an alarm definitions (alarmdef) file and report resulting
alarm status and activity. Before issuing the analyze command, you
should run the checkdef command to check the alarm definitions
syntax. Checkdef also sets and saves the alarm definitions file name to
be used with analyze. If you do not run checkdef before analyze, you
are prompted for an alarm definitions file name.
If you are using command line mode, the default alarm definitions file
/var/opt/perf/alarmdef is used.
For detailed information about alarm definitions, see Chapter 7,
“Performance Alarms,” on page 207.
Syntax
analyze
How to Use It
When you issue the analyze command, it analyzes the log files specified
in the data sources configuration file, datasources, against the alarm
definitions in the alarmdef file.
The analyze command allows you to evaluate whether or not your alarm
definitions are a good match against the historical data collected on your
system. It also lets you decide if your alarm definitions will generate too
many or too few alarms on your analysis workstation.
Also, you can perform data analysis with definitions (IF statements) set
in the alarm definitions file because you can get information output by
PRINT statements when conditions are met. For explanations of how to
use the IF and PRINT statements in an alarm definition, see Chapter 7,
“Performance Alarms,” on page 207.
Chapter 4 81
Utility Commands
analyze
You can optionally run the start, stop, and detail commands with
analyze to customize the analyze process. You specify these commands
in the following order:
checkdef
start
stop
detail
analyze
Use the start and stop commands if you want to analyze log file data
that was collected during a specific period of time. (Descriptions of the
start and stop commands appear later in this chapter.)
While the analyze command is executing, it lists alarm events such as
alarm start, end, and repeat status plus any text in associated print
statements. Also, any text in PRINT statements is listed as conditions
(in IF statements) become true. EXEC statements are not executed but
are listed so you can see what would have been executed. An alarm
summary report shows a count of the number of alarms and the amount
of time each alarm was active (on). The count includes alarm starts and
repeats, but not alarm ends.
If you want to see the alarm summary report only, issue the detail off
command. However, if you are using command line mode, detail off is
the default so you need to specify -D to see the alarm events as well as
the alarm summary.
Example
The checkdef command checks the alarm definitions syntax in the
alarmdef file and saves the name of the alarmdef file for later use with
the analyze command. The start today command specifies that only
data logged today is to be analyzed. Lastly, the analyze command
analyzes the log file in the default SCOPE data source specified in the
datasources file against the alarm definitions in the alarmdef file.
utility>
checkdef /var/opt/perf/alarmdef
start today
analyze
To perform the above task using command line arguments, enter:
utility -xc -D -b today -xa
82 Chapter 4
Utility Commands
checkdef
checkdef
Use the checkdef command to check the syntax of the alarm definitions
in an alarm definitions file and report any warnings or errors that are
found. This command also sets and saves the alarm definitions file name
for use with the analyze command.
For descriptions of the alarm definitions syntax and how to specify alarm
definitions, see Chapter 7, “Performance Alarms,” on page 207.
Syntax
checkdef [/directorypath/alarmdef]
Parameters
How to Use It
When you have determined that the alarm definitions are correct, you
can process them against the data in a log file using the analyze
command.
In batch mode, if no alarm definitions file is specified, the default
alarmdef file is used.
In interactive mode, if no alarm definitions file is specified, you are
prompted to specify one.
Example
The checkdef command checks the alarm definitions syntax in the
alarmdef file and then saves the name of the alarmdef file for later use
with the analyze command.
utility>
checkdef /var/opt/perf/alarmdef
To perform the above task using command line arguments, enter:
utility -xc
Chapter 4 83
Utility Commands
detail
detail
Use the detail command to control the level of detail printed in the
analyze, parmfile, and scan reports.
The default is detail on in interactive and batch modes and detail
off in command line mode.
Syntax
detail [on]
[off]
Parameters
How to Use It
For explanations of how to use the detail command with the analyze,
scan, and parmfile commands, see the analyze, parmfile, and scan
command descriptions in this chapter.
Examples
For examples of using the detail command, see the descriptions of the
analyze, parmfile, and scan commands in this chapter.
84 Chapter 4
Utility Commands
exit
exit
Use the exit command to terminate the utility program. The exit
command is equivalent to the utility program’s quit command.
Syntax
exit
e
Chapter 4 85
Utility Commands
guide
guide
Use the guide command to enter guided commands mode. The guided
command interface leads you through the various utility commands
and prompts you to perform the most common tasks that are available.
Syntax
guide
Hot to Use It
86 Chapter 4
Utility Commands
help
help
Use the help command to access the utility program's online help
facility.
Syntax
help [keyword]
How to Use It
You can enter parameters to obtain information on utility commands
and tasks, or on help itself. You can navigate to different topics by
entering a key word. If more than one page of information is available,
the display pauses and waits for you to press Return before continuing.
Type q or quit to exit the help system and return to the utility
program.
You can also request help on a specific topic. For example,
help tasks
or
help resize parms
When you use this form of the help command, you receive the help text
for the specified topic and remain in the utility command entry
context. Because you do not enter the help subsystem interactively, you
do not have to type quit before entering the next utility command.
Chapter 4 87
Utility Commands
list
list
Use the list command to specify the output file for all utility reports.
The contents of the report depends on which other commands are issued
after the list command. For example, using the list command before
the logfile, detail on, and scan commands produces the list file for a
detailed summary report of a log file.
Syntax
list [filename]|*
where * sets the output back to stdout.
How to Use It
There are two ways to specify the list file for reports:
88 Chapter 4
Utility Commands
list
The list * command sets the list device back to the default stdout. !lp
utilrept sends the disk file to the system printer.
utility>
logfile rxlog
list utilrept
detail off
scan
list *
!lp utilrept
To perform the above task using command line arguments, enter:
utility -l rxlog -f utilrept -d -xs print utilrept
Chapter 4 89
Utility Commands
logfile
logfile
Use the logfile command to open a log file. For many utility program
functions, a log file must be opened. You do this explicitly by issuing the
logfile command or implicitly by issuing some other command. If you
are in batch or command line mode and do not specify a log file name, the
default /var/opt/perf/datafiles/logglob file is used. If you are in
interactive mode and do not specify a log file name, you are prompted to
provide one or accept the default /var/opt/perf/datafiles/logglob
file.
Syntax
logfile [logfile]
How to Use It
You can specify the name of either a raw or extracted log file. If you
specify an extracted log file name, all information is obtained from this
single file. You do not need to specify any of the raw log files other than
the global log file, logglob. Opening logglob gives you access to all of
the data in the other logfiles.
Raw log files have the following names:
90 Chapter 4
Utility Commands
logfile
You can verify the log file you opened with the show command, as
described later.
You can open another log file at any time by entering another logfile
command. Any currently opened log file is closed before the new log file is
opened.
The resize and scan commands require a log file to be open. If no log file
is currently open, an implicit logfile command is executed.
CAUTION Do not rename raw log files! Access to these files assumes that the
standard log file names are in effect.
You may have more than one set of raw log files on the same system, in
separate directories for each set of files. If you want to resize the log files
in any way, you must have read/write access to all the log files.
Chapter 4 91
Utility Commands
menu
menu
Use the menu command to print a list of the available utility
commands.
Syntax
menu
Example
utility> menu
Command Parameters Function
HELP [topic] Get information on commands and options
GUIDE Enter guided commands mode for novice
users
LOGFILE [logname] Specify a log file to be processed
LIST [filename|*] Specify the listing file
START [startdate time] Set starting date & time for SCAN or
ANALYZE
STOP [stopdate time] Set ending date & time for SCAN or
ANALYZE
DETAIL [ON|OFF] Set report detail for SCAN, PARMFILE, or
ANALYZE
SHOW [ALL] Show the current program settings
PARMFILE [parmfile] Check parsing of a parameter file
SCAN [logname] Read the log file and produce a summary report
RESIZE [GLOB|APPL|PROC|DEV|TRAN][DAYS=][EMPTY=] Resize raw log
files
CHECKDEF [alarmdef] Check parsing and set the alarmdef file
ANALYZE Analyze the log file using the alarmdef
file
! or Sh [command] Execute a system command
MENU or ? List the commands menu (This listing)
EXIT or Q Terminate the program
utility>
92 Chapter 4
Utility Commands
parmfile
parmfile
Use the parmfile command to view and syntax check the OV
Performance Agent parm file settings that are used for data collection.
Syntax
parmfile [/directorypath/parmfile]
How to Use It
You can use the parmfile command to do any of the following:
• Examine the parm file for syntax warnings and review the resulting
settings. All parameters are checked for correct syntax and errors are
reported. After the syntax check is completed, only the applicable
settings are reported.
• Find out how much room is left for defining applications.
• If detail on is specified, print the effective contents of the parm file
plus any default settings that were not overridden, and print
application definitions.
In batch mode, if no parm file name is specified, the
/var/opt/perf/parm file is used.
In interactive mode, if no parm file name is supplied, you are prompted to
supply one.
Example
The parmfile command checks the syntax of the current parm file and
reports any warnings or errors. Detail on lists the logging parameter
settings.
utility>
detail on
parmfile parm
To perform the above task using command line arguments, enter:
utility -xp -D
Chapter 4 93
Utility Commands
quit
quit
Use the quit command to terminate the utility program. The quit
command is equivalent to the utility program’s exit command.
Syntax
quit
q
94 Chapter 4
Utility Commands
resize
resize
Use the resize command to manage the space in your raw log file set.
This is the only program you should use to resize the raw log files in
order to preserve coordination between the files and their internal
control structures. If you use other tools you might remove or destroy the
validity of these control structures.
The utility program cannot be used to resize extracted files. If you
want to resize an extracted file, use the extract program to create a new
extracted log file.
Syntax
resize [global ] [days=maxdays] [empty=days] [yes ]
[application] [size=maxMB ] [space=MB ] [no ]
[process ] [maybe]
[device ]
[transaction]
Parameters
log file type Specifies the type of raw data you want to resize:
global, application, process, device, or transaction,
which correspond to the raw log files logglob,
logappl, logproc, logdev, and logtran. If you
do not specify a data type and are running
utility in batch mode, the batch job terminates.
If you are running utility interactively, you are
prompted to supply the data type based on those
log files that currently exist.
days & size Specify the maximum size of the log file. The
actual size depends on the amount of data in the
file.
Chapter 4 95
Utility Commands
resize
You might expect that a log file would not fill up until the specified
number of days after a resizing operation. You may want to use this
feature of the resize command to minimize the number of times a log
file must be resized by the scopeux collector because resizing can occur
any time the file is filled. Using resize to force a certain amount of
empty space in a log file causes the log file to be resized when you want it
to be.
The days and empty values are entered in units of days; the size and
space values are entered in units of megabytes. Days are converted to
megabytes by using an average megabytes-per-day value for the log file.
This conversion factor varies depending on the type of data being logged
and the particular characteristics of your system.
More accurate average-megabytes-per-day conversion factors can be
obtained if you issue the scan command on the existing log file before
you issue the resize command. A scan measures the accumulation rates
for your system. If no scan is done or if the measured conversion factor
seems unreasonable, the resize command uses a default conversion
factor for each type of data.
96 Chapter 4
Utility Commands
resize
If Executed
Parameter If Executed in Batch
Interactively
How to Use It
Before you resize a log file, you must stop OV Performance Agent using
the steps under “Stopping and Restarting Data Collection” on page 49 in
Chapter 2, “Managing Data Collection”.
A raw log file must be opened before resizing can be performed. Open the
raw log file with the logfile command before issuing the resize
command. The files cannot be opened by any other process.
Chapter 4 97
Utility Commands
resize
98 Chapter 4
Utility Commands
resize
Chapter 4 99
Utility Commands
resize
NOTE If you use the script described above, remember to stop scopeux before
running it. See the “Starting & Running OV Performance Agent” chapter
in your HP OpenView Performance Agent Installation & Configuration
Guide for information about stopping and starting scopeux.
100 Chapter 4
Utility Commands
scan
scan
Use the scan command to read a log file and write a report on its
contents. (For a detailed description of the report, see “Utility Scan
Report Details” on page 66 in Chapter 3, “Using the Utility Program”.
Syntax
scan
How to Use It
The scan command requires a log file to be opened. The log file scanned
is the first of one of the following:
start Specifies the date and time of the first log file record
you want to scan. The default is the beginning of the
log file.
stop Specifies the date and time of the last log file record
you want to scan. The default is the end of the log
file.
For more information about the detail, list, start, and stop
commands, see their descriptions in this chapter.
The scan command report consists of 12 sections. You can control which
sections are included in the report by issuing the detail command prior
to issuing scan.
Chapter 4 101
Utility Commands
scan
The following four sections are always printed (even if detail off is
specified):
102 Chapter 4
Utility Commands
sh
sh
Use sh to enter a shell command without exiting utility by typing sh or
an exclamation point (!) followed by a shell command.
Syntax
sh or ! [shell command]
Parameters
How to Use It
Following the execution of the single command, you automatically return
to utility. If you want to issue multiple shell commands without
returning to utility after each one, you can start a new shell. For
example,
sh ksh
or
!ksh
Chapter 4 103
Utility Commands
show
show
Use the show command to list the names of the files that are open and
the status of the utility parameters that can be set.
Syntax
show [all]
Examples
Use show to produce a list that may look like this:
Logfile: /var/opt/perf/datafiles/logglob
List: "stdout"
Detail: ON for ANALYZE, PARMFILE and SCAN functions
The default starting date & time = 10/08/99 08:17 AM (FIRST + 0)
The default stopping date & time = 11/20/99 11:59 PM (LAST - 0)
The default shift = 12:00 AM - 12:00 AM
NOTE The default shift time is shown for information only. Shift time cannot be
changed in utility.
Use show all to produce a more detailed list that may look like this:
Logfile: /var/opt/perf/datafiles/logglob
Global file: /var/opt/perf/datafiles/logglob
Application file: /var/opt/perf/datafiles/logappl
Process file: /var/opt/perf/datafiles/logproc
Device file: /var/opt/perf/datafiles/logdev
Transaction file: /var/opt/perf/datafiles/logtran
Index file: /var/opt/perf/datafiles/logindx
System ID: homer
System Type 9000/715 S/N 66677789 OS/ HP-UX B.10.20 A
Data Collector: SCOPE/UX C.02.30
File created: 10/08/99
Data Covers: 44 days to 11/20/99
Shift is: All Day
Data records available are:
Global Application Process Disk Volume Transaction
Maximum file sizes:
Global=10.0 Application=10.0 Process=20.0 Device=10.0 Transaction
10.0 MB
104 Chapter 4
Utility Commands
show
List "stdout"
Detail ON for ANALYZE, PARMFILE and SCAN functions
The default starting date & time = 10/08/99 11:50 AM (FIRST + 0)
The default stopping date & time = 11/20/99 11:59 PM (LAST - 0)
The default shift = 12:00 AM - 12:00 AM
Chapter 4 105
Utility Commands
start
start
Use the start command to specify the beginning of the subset of a log
file that you want to scan or analyze. Start lets you start the scan or
analyze process at data that was logged at a specific date and time.
The default starting date and time is set to the date and time of the first
record of any type in a log file that has been currently opened with the
logfile command.
Syntax
[date [time]]
start [today [-days] [time]]
[last [-days] [time]]
[first [+days] [time]]
Parameters
time The time format also depends on the native language being
used. For C, the format is hh:mm am or hh:mm pm
(hour:minute in 12-hour format with the am/pm suffix) such
as 07:00 am for 7 o'clock in the morning. Twenty-four hour
time is accepted in all languages. For example, 23:30 would
be accepted for 11:30 pm.
If the date or time is entered in an unacceptable format, an
example in the correct format is shown.
If no start time is given, a midnight (12 am) is assumed. A
starting time of midnight for a given day starts at the
beginning of that day (00:00 on a 24-hour clock).
106 Chapter 4
Utility Commands
start
last Can be used to represent the last date contained in the log
file. The parameter last-days specifies the number of
days prior to the last date in the log file.
first Can be used to represent the first date contained in the log
file. The parameter first+days specifies the number of
days after the first date in the log file.
How to Use It
The start command is useful if you have a very large log file and do not
want to scan or analyze the entire file. You can also use it to specify a
specific time period for which data is scanned. For example, you can scan
a log file for data that was logged for a period beginning 14 days before
the present date by specifying today-14.
You can use the stop command to further limit the log file records you
want to scan.
If you are not sure whether native language support is installed on your
system, you can force utility to use the C date and time formats by
issuing the following statement before running utility:
LANG=C; export LANG
or in C Shell
setenv LANG C
Example
The scan of the default global log file starts with records logged from
August 5, 1999 at 8:00 AM until the present date and time.
utility>
logfile /var/opt/perf/datafiles/logglob
detail on
start 8/5/99 8:00 AM
scan
To perform the above task using command line arguments, enter:
utility -D -b 8/5/99 8:00 am -xs
Chapter 4 107
Utility Commands
stop
stop
Use the stop command to specify the end of a subset of a log file that you
want to scan or analyze. Stop lets you terminate the scan or analyze
process at data that was logged at a specific date and time.
The default stopping date and time is set to the date and time of the last
record of any type in a log file that has been currently opened with the
logfile command.
Syntax
[date [time]]
stop [today [-days] [time]]
[last [-days] [time]]
[first [+days] [time]]
Parameters
time The time format also depends on the native language being
used. For C, the format is hh:mm am or hh:mm pm
(hour:minute in 12-hour format with the am/pm suffix) such
as 07:00 am for 7 o'clock in the morning. Twenty-four hour
time is accepted in all languages. For example, 23:30 would
be accepted for 11:30 pm.
If the date or time is entered in an unacceptable format, an
example in the correct format is shown.
If no stop time is given, one minute before midnight (11:59
pm) is assumed. A stopping time of midnight (12 am) for a
given day stops at the end of that day (23:59 on a 24-hour
clock).
108 Chapter 4
Utility Commands
stop
last Can be used to represent the last date contained in the log
file. The parameter last-days specifies the number of
days prior to the last date in the log file.
first Can be used to represent the first date contained in the log
file. The parameter first+days specifies the number of
days after the first date in the log file.
How to Use It
The stop command is useful if you have a very large log file and do not
want to scan the entire file. You can also use it to specify a specific time
period for which data is scanned. For example, you can scan a log file for
seven-days worth of data that was logged starting a month before the
present date.
If you are not sure whether native language support is installed on your
system, you can force utility to use the C date and time formats by
issuing the following statement before running utility:
LANG=C; export LANG
or in C Shell
setenv LANG C
Example
The scan of 14 days worth of data starts with records logged from July 5,
1999 at 8:00 AM and stops at the last record logged July 18, 1999 at
11:59 pm.
utility>
logfile /var/opt/perf/datafiles/logglob
detail on
start 7/5/99 8:00 am
stop 7/18/99 11:59 pm
scan
To perform the above task using command line arguments, enter:
utility -D -b 7/5/99 8:00 am -e 7/18/99 11:59pm -xs
Chapter 4 109
Utility Commands
stop
110 Chapter 4
5 Using the Extract Program
Chapter 5 111
Using the Extract Program
Introduction
Introduction
The extract program has two main functions: it lets you extract data
from raw log files and write it to extracted log files. Extract also lets you
export log file data for use by analysis products such as spreadsheets.
The extract and export functions copy data from a log file; no data is
removed.
Three types of log files are used by OV Performance Agent:
• Extract subsets of data from raw scopeux log files into an extracted
log file format that is suitable for placing in archives, for transport
between systems, and for analysis by OV Performance Manager.
Data cannot be extracted from DSI log files.
• Manage archived log file data by extracting or exporting data from
extracted format files, appending data to existing extracted log files,
and subsetting data by type, date, and shift (hour of day).
• Export data from raw or extracted scopeux log files and DSI log files
into ASCII, binary, datafile, or WK1 (spreadsheet) formats suitable
for reporting and analysis or for importing into spreadsheets or
similar analysis packages.
112 Chapter 5
Using the Extract Program
Introduction
NOTE The extract function cannot produce summarized data. Summary data
can only be produced by the export function.
Chapter 5 113
Using the Extract Program
Running the Extract Program
114 Chapter 5
Using the Extract Program
Running the Extract Program
Chapter 5 115
Using the Extract Program
Using Interactive Mode
116 Chapter 5
Using the Extract Program
Extract Command Line Interface
Command
Argument Description
Option
Chapter 5 117
Using the Extract Program
Extract Command Line Interface
Command
Argument Description
Option
118 Chapter 5
Using the Extract Program
Extract Command Line Interface
Command
Argument Description
Option
c = configuration
detail (See “configuration”
command in Chapter 6.)
Chapter 5 119
Using the Extract Program
Extract Command Line Interface
Command
Argument Description
Option
A = application summary
(See “application” command
in Chapter 6.)
120 Chapter 5
Using the Extract Program
Extract Command Line Interface
Command
Argument Description
Option
Y = filesystem summary
(See “filesystem” command
in Chapter 6.)
Chapter 5 121
Using the Extract Program
Extract Command Line Interface
Command
Argument Description
Option
122 Chapter 5
Using the Extract Program
Extract Command Line Interface
• If an action is specified (-xp, -xw, -xm, -xy, or -xt), the program will
execute those command options after all other parameters are
evaluated, regardless of where they were positioned in the list of
parameters.
• If an action is specified in the command line, the extract program
will not read from its stdin file; instead it will terminate following
the action:
extract -f rxdata -r /var/opt/perf/rept1 -xp d-1 -G
Which translates into:
Note that the actual exporting is not done until the end so the -G
parameter is processed before the export is done.
Also notice that the log file was not specified so it uses the default
logglob file.
Because an action was specified (-xp), once the export is finished the
extract program terminates without reading from its stdin file. In
addition, verbose mode was not set with the -v command option so all
extraneous output to stdout is eliminated.
Chapter 5 123
Using the Extract Program
Overview of the Export Function
124 Chapter 5
Using the Extract Program
Overview of the Export Function
any DSI class Intervals and summaries for DSI log files
• You can specify which data items (metrics) are needed for each type
of data.
• You can specify starting and ending dates for the time period in
which the data was collected along with shift and weekend exclusion
filters.
• You can specify the desired format for the exported data in an export
template file. This file can be created using any text editor or word
processor that lets you save a file in ASCII (text) format.
• You can also use the default export template file,
/var/opt/perf/reptfile. This file specifies the
following output format settings:
Chapter 5 125
Using the Extract Program
Overview of the Export Function
126 Chapter 5
Using the Extract Program
Overview of the Export Function
NOTE No output file is created unless you specify the type and associated items
that match the data in the export template file prior to issuing the export
command.
Chapter 5 127
Using the Extract Program
Overview of the Export Function
Parameters
report Specifies the title for the export file. For more
information, see the following section, “Export File
Title” on page 132.
ASCII
Datafile
128 Chapter 5
Using the Extract Program
Overview of the Export Function
Binary
WK1 (spreadsheet)
Chapter 5 129
Using the Extract Program
Overview of the Export Function
130 Chapter 5
Using the Extract Program
Overview of the Export Function
The output and layout parameters can be used more than once within
an export template file. For example:
data type global
output=myglobal
gbl_cpu_total_util
NOTE You cannot specify different layouts within a single data type. For
example, you cannot specify data type disk once with
layout = multiple and again with layout = single within the same
export file.
Chapter 5 131
Using the Extract Program
Overview of the Export Function
1. Determine which data items (metrics) are needed from each data
type and in what format you will access them.
For this example, you want an ASCII file without headings and with
fields separated by commas.
2. Create and save the following ASCII export template file in the
/var/opt/perf/ directory. Name the file report1.
REPORT "sample export template file (report1)"
FORMAT ASCII
HEADINGS OFF
132 Chapter 5
Using the Extract Program
Overview of the Export Function
Chapter 5 133
Using the Extract Program
Overview of the Export Function
second data
record
...
Report title and heading lines are not repeated in the file.
134 Chapter 5
Using the Extract Program
Overview of the Export Function
Hints
Chapter 5 135
Using the Extract Program
Overview of the Export Function
136 Chapter 5
Using the Extract Program
Overview of the Export Function
Files)
-7 Disk Device Name Record (for Multiple Instance Disk Device
Files)
-8 Logical Volume Name Record (for Multiple Instance Lvolume
Files)
-9 Netif Name Record (for Multiple Instance Netif Files)
-10 Filesystem Name Record (for Multiple Instance Netif Files)
-11 CPU Name Record (for Multiple Instance Netif Files)
Chapter 5 137
Using the Extract Program
Overview of the Export Function
Binary format files have special formats for the title and header records.
These records contain the information needed to describe the contents of
the file so that a program can properly interpret it. If headings off is
specified, only data records will be in the file. If headings on is specified,
the following records will precede all data records.
138 Chapter 5
Using the Extract Program
Overview of the Export Function
Chapter 5 139
Using the Extract Program
Overview of the Export Function
140 Chapter 5
Using the Extract Program
Overview of the Export Function
Chapter 5 141
Using the Extract Program
Overview of the Export Function
If applications are added or deleted during the time covered in the data
extraction, the Application Name Record is repeated with the new
application names.
142 Chapter 5
Using the Extract Program
Overview of the Export Function
If logical volumes are added during the time covered in the data
extraction, the Logical Volume Name Record will be repeated with the
new logical volume name appended to the end of the original list. Logical
volumes that are deleted after the start of the data extraction will not be
removed from the Multiple Layout data record.
Chapter 5 143
Using the Extract Program
Overview of the Export Function
144 Chapter 5
6 Extract Commands
Chapter 6 145
Extract Commands
Introduction
Introduction
This chapter describes the extract program’s commands. It includes a
table showing command syntax, a table of commands for extracting and
exporting data, and a command reference section describing the
commands in alphabetical order.
Commands and parameters for extract can be entered with any
combination of uppercase and lowercase letters. Only the first three
letters of the command's name are required, except for the weekdays and
weekly commands that require you to enter the whole name. For
example, the command application detail can be abbreviated as app
det.
Examples of how these commands are used can be found in online help
for the extract program.
The table on the following pages summarizes the syntax of the extract
commands and their parameters.
NOTE The extract function cannot produce summarized data. Summary data
can only be produced by the export function.
146 Chapter 6
Extract Commands
Introduction
Command Parameter
application on
detail
summary (export only)
both (export only)
off (default)
cpu detail
summary (export only)
both (export only)
off (default)
configuration on
detail
off (default)
disk on
detail
summary (export only)
both (export only)
off (default)
exit
e
Chapter 6 147
Extract Commands
Introduction
Command Parameter
filesystem detail
summary (export only)
both (export only)
off (default)
global on
detail (default)
summary (export only)
both (export only)
off
guide
help
list filename
*
logfile logfile
lvolume on
detail
summary (export only)
both (export only)
off (default)
menu
monthly yyymm
mm
netif on
detail
summary (export only)
both (export only)
off (default)
output outputfile
,new
,purgeboth
,append
148 Chapter 6
Extract Commands
Introduction
Command Parameter
process on
detail [app#[-#],...]
off (default)
killed
quit
q
sh shell command
!
show all
start date[time]
today[-days][time]
last[-days][time]
first[+days][time]
stop date[time]
today[-days][time]
last[-days][time]
first[+days][time]
transaction on
detail
summary (export only)
both (export only)
off (default)
weekdays 1.....7
weekly yyww
ww
Chapter 6 149
Extract Commands
Introduction
Command Parameter
yearly yyyy
yy
150 Chapter 6
Extract Commands
Introduction
The following table lists the commands that are used for extracting and
exporting data and the types of log files used (scopeux log files or DSI log
files).
application x x x
class x x x x
configuration x x
cpu x x x
disk x x x
export x x x
extract x x
filesystem x x x
global x x x
logfile x x x x
lvolume x x x
monthly x x
netif x x
output x x x x
process x x x
report x x x
shift x x x
start x x x x
stop x x x x
Chapter 6 151
Extract Commands
Introduction
transaction x x x
weekdays x x x
weekly x x
yearly x x
152 Chapter 6
Extract Commands
application
application
Use the application command to specify the type of application data
that is being extracted or exported.
The default is application off
Syntax
[on]
[detail]
application [off]
Parameters
on or detail Specifies that raw, 5-minute detail data should be
extracted or exported.
summary
(export only) Specifies that data should be summarized by:
• the number of minutes specified with the summary
parameter in the specified export template file
(export only)
• the default summary interval of one hour (export
or extract)
Summarization can significantly reduce the size of the
resulting extracted or exported data, depending on the
summarization interval used. For example, hourly
summary data is about one-tenth the size of 5-minute
detail data.
both
(export only) Specifies that detail data and summary data are to be
extracted or exported.
off Specifies that no data of this type is to be extracted or
exported.
Chapter 6 153
Extract Commands
application
NOTE If you are using OV Performance Manager, detail data must be included
in an extracted file before drawing application graphs with points every
5 minutes.
Example
In this example, the application command causes detailed application
log file data to be exported: The output export file contains the
application metrics specified in the myrept export template file.
logfile /var/opt/perf/datafiles/logglob
global off
application detail
report /var/opt/perf/myrept
export
To perform the above task using command line arguments, enter:
extract -a -r /var/opt/perf/myrept -xp
154 Chapter 6
Extract Commands
class
class
Use the class command to specify the class of DSI data to be exported,
or scopeux data to be extracted or exported.
The default is class detail.
Syntax
[detail]
[both]
[off]
Parameters
detail For DSI log files, specifies how much detail data is
exported according to the time set in DSI log file. (For
more information, see the HP OpenView Performance
Agent for UNIX Data Source Integration Guide.)
For scopeux log files, specifies that raw, 5-minute
detail should be extracted or exported.
Examples
To export summary data in a DSI log file that contains a class named
acctg_info, issue the following command:
class acctg_info summary
Once the log file is specified by the user and opened by the extract
program, the acctg_info class is verified to exist in the log file and can
subsequently be exported.
Other variations of this command are:
Chapter 6 155
Extract Commands
class
156 Chapter 6
Extract Commands
configuration
configuration
Use the configuration command to specify whether or not to export
system configuration information.
The default is configuration off.
Syntax
[on]
configuration [detail]
[off]
Parameters
on or detail Specifies that all configuration records should be
exported.
off Specifies that no configuration data is to be exported.
All configuration information available in the log file is exported. Any
begin, end, shift, start, stop or noweekends commands that are
used with the configuration command are ignored.
NOTE The configuration command affects only the export function. The extract
function is not affected because it always extracts system configuration
information.
Example
In this example, the configuration command causes system
configuration information to be exported. The output export file contains
the configuration metrics specified in the myrept export template file.
logfile /var/opt/perf/datafiles/logglob
configuration on
report /var/opt/perf/myrept
export
To perform the above task using command line arguments, enter:
extract -c -r /var/opt/perf/myrept -xp
Chapter 6 157
Extract Commands
cpu
cpu
Use the cpu command to specify the summarization level of CPU.
The default is cpu off.
Syntax
[detail]
cpu [summary]
[both][of
f]
Parameters
detail Extracts or exports 5-minute detail records.
summary Exports summary records.
both Exports both detail and summary records.
off Extracts or exports no CPU data.
Example
In this example, the cpu command causes CPU detail data that was
collected starting July 26, 2001 to be exported. Because no export
template file is specified, the default export template file, reptfile, is
used. All disk metrics are included in the output file as specified by
reptfile.
logfile /var/opt/perf/datafiles/logglob
global off
cpu detail
start 7/26/01
export
To perform the above task using command line arguments, enter:
extract -u -b 7/26/01 -xp
158 Chapter 6
Extract Commands
disk
disk
Use the disk command to specify the type of disk device data that is
being extracted or exported.
The default is disk off.
Syntax
[on]
[detail]
disk [summary]
[both]
[off]
Parameters
Example
In this example, the disk command causes disk detail data that was
collected starting July 5, 1999 to be exported. Because no export
template file is specified, the default export template file, reptfile, is
used. All disk metrics are included in the output file as specified by
reptfile.
logfile /var/opt/perf/datafiles/logglob
global off
disk detail
start 7/5/99
export
To perform the above task using command line arguments, enter:
extract -D -b 7/5/99 -xp
Chapter 6 159
Extract Commands
exit
exit
Use the exit command to terminate the extract program. The exit
command is equivalent to the extract program’s quit command.
Syntax
exit
e
160 Chapter 6
Extract Commands
export
export
Use the export command to start the process of copying data into an
exported file format.
Syntax
Parameters
Use one of the following parameters to export data for a particular
interval.
day Represents a single day
week Represents a single week, Monday through
Sunday
month Represents a single month, first through last
calendar day
year Represents a single year, first through last
calendar day
If no parameters are used with the export command, the interval used
for the exported data is set by the start and stop commands.
How to Use It
There are four ways to specify a particular interval (day, week, month,
year).
Chapter 6 161
Extract Commands
export
162 Chapter 6
Extract Commands
export
For more information about exporting data, see “Overview of the Export
Function” in Chapter 5, Using the Extract Program,.
Example
In this example, the export command causes log file data collected
yesterday from 8:00 am to 5 pm to be exported. Because no export
template file is specified, the default export template file, reptfile, is
used. All global metrics are included in the output file as specified by
reptfile
logfile /var/opt/perf/datafiles/logglob
start today-1 8:00 am
stop today-1 5:00 pm
global both
export
To perform the above task using command line arguments, enter:
extract -gG -b today 8:00 am -e today 5:00 pm -xp
Chapter 6 163
Extract Commands
extract
extract
Use the extract command to start the process of copying data from raw
log files into an extracted file format. Extracted files can be used for
archiving or for analysis by analyzer programs such as OV Performance
Manager. You can extract data from raw log files and from extracted
files.
The extract command cannot be used to process data from DSI log files.
Syntax
Parameters
Use one of the following parameters to extract data for a particular
interval:
day Represents a single day
week Represents a single week, Monday through
Sunday
month Represents a single month, first through last
calendar day
year Represents a single year, first through last
calendar day
If no parameters are used with the extract command, the interval used
for data extraction is set by the start and stop commands.
How to Use It
There are four ways to specify a particular interval (day, week, month,
year).
164 Chapter 6
Extract Commands
extract
Chapter 6 165
Extract Commands
extract
166 Chapter 6
Extract Commands
filesystem
filesystem
Use this command to specify the summarization level of filesystem data
to extract or export.
The default is filesystem off.
Syntax
[detail]
filesystem [summary]
[both]
[off]
Parameters
detail Extracts or exports 5-minute detail records.
summary Exports summary records.
both Exports both detail and summary records.
off Extracts or exports no filesystem data.
Example
In this example, the filesystem command causes filesystem detail data
that was collected starting July 26, 2001 to be exported. Because no
export template file is specified, the default export template file,
reptfile, is used. All filesystem metrics are included in the output file
as specified by reptfile.
logfile /var/opt/perf/datafiles/logglob
global off
filesystem detail
start 7/26/01
export
To perform the above task using command line arguments, enter:
extract -y -b 7/26/01 -xp
Chapter 6 167
Extract Commands
global
global
Use the global command to specify the amount of global data to be
extracted or exported.
The default is global detail. (In command line mode, the default is
global off.)
Syntax
[on]
[detail]
global [summary]
[both]
[off]
Parameters
How to Use It
Detail data must be extracted if you want to draw OV Performance
Manager global graphs with points every 5 minutes.
Summarized data is graphed by OV Performance Manager more quickly
since fewer data records are needed to produce a graph. If only global
summaries are extracted, OV Performance Manager global graphs
cannot be drawn with data points every 5 minutes.
The both option maintains the access speed gained with the hourly
summary records while permitting you to draw OV Performance
Manager global graphs with points every 5 minutes.
The off parameter is not recommended if you are using OV Performance
Manager because you must have global data to properly understand
overall system behavior. OV Performance Manager global graphs cannot
be drawn unless the extracted file contains at least one type of global
data.
168 Chapter 6
Extract Commands
global
Example
The global command is used here to specify that no global data is to be
exported (global detail is the default). Only detailed transaction data
is exported. The output export file contains the transaction metrics
specified in the myrept export template file.
extract>
logfile /var/opt/perf/datafiles/logglob
global off
transaction detail
report /var/opt/perf/myrept
export
To perform the above task using command line arguments, enter:
extract -l -t -r /var/opt/perf/myrept -xp
Chapter 6 169
Extract Commands
guide
guide
Use the guide command to enter guided commands mode. The guided
command interface leads you through various extract commands and
prompts you to perform some of the most common tasks that are
available.
Syntax
guide
How to Use It
NOTE If you are exporting DSI log file data, we recommend using guided
commands mode to create a customized export template file and export
the data.
170 Chapter 6
Extract Commands
help
help
Use the help command to access online help.
Syntax
help [keyword]
How to Use It
You can enter parameters to obtain information on extract commands
and tasks, or on help itself. You can navigate to different topics by
entering a key word. If more than one page of information is available,
the display pauses and waits for you to press Return before continuing.
Type q or quit to exit the help system and return to the extract
program.
You can also request help on a specific topic. For example,
help tasks
or
help resize parms
When you use this form of the help command, you receive the help text
for the specified topic and remain in the extract command entry
context. Because you do not enter the help subsystem interactively, you
do not have to type quit before entering the next extract command.
Chapter 6 171
Extract Commands
list
list
Use the list command to specify the list file for all extract program
reports.
Syntax
list [file]
[*]
How to Use It
You can use list at any time while using extract to specify the list
device. It uses a file name or list device name to output the user-specified
settings. If the list file already exists, the output is appended to it.
The data that is sent to the list device is also displayed on your screen.
While extract is running, type:
list outfilename
To return the listing device to the user terminal, type:
list stdout
OR
list *
To determine the current list device, type the list command without
parameters as follows:
list
If the list file is not stdout, most commands are echoed to the list file as
they are entered.
172 Chapter 6
Extract Commands
list
Example
The following example, the list device is set to mylist. The results of the
next commands are printed to mylist and displayed on your screen.
extract>
logfile /var/opt/perf/datafiles/logglob
list mylist
global detail
shift 8:00 AM - 5:00 PM
extract
Chapter 6 173
Extract Commands
logfile
logfile
Use the logfile command to open a log file. You must open a log file for
all extract program functions. You can do this explicitly by issuing the
logfile command, or implicitly by issuing the extract command or
export command. If you do not specify a log file name, the extract
program prompts you for a log file name and displays the default global
log file /var/opt/perf/datafiles/logglob. You can either accept the
default or specify a different log file.
Syntax
logfile [logfile]
How to Use It
To open a log file, you can specify the name of either a raw or extracted
log file. You cannot specify the name of a file created by the export
command. If you specify an extracted log file name, all information is
obtained from this single file. If you specify a raw log file name, you must
specify the name of the global log file before you can access the raw log
file. This is the only raw log file name you should specify.
If the log file is not in your current working directory, you must provide
its path.
The global log file and other raw log files must be in the same directory.
They have the following names:
The general contents of the log file are displayed when the log file is
opened.
174 Chapter 6
Extract Commands
logfile
CAUTION Do not rename raw log files! When accessing these files, the program
assumes that the standard log file names are in effect. If you must
rename log files to place log files from multiple systems on the same
system for analysis, you should first extract the data and then rename
the extracted log files.
Example
This is a typical listing of the default global log file.
Global file: /var/opt/perf/datafiles/logglob, version D
Application file: /var/opt/perf/datafiles/logappl
Process file: /var/opt/perf/datafiles/logproc
Device file: /var/opt/perf/datafiles/logdev
Transaction file: /var/opt/perf/datafiles/logdev
Index file: /var/opt/perf/datafiles/logindx
System ID: homer
System Type 9000/715/ S/N 2223334442 O/S HP-UX B.10.20 A
Data collector: SCOPE/UX C.02.30
File Created: 10/08/99
Data Covers: 44 days to 11/20/99
Shift is: All Day
Data records available are:
Global Application Process Disk Volume Transaction
Maximum file sizes:
Global=10.0 Application=10.0 Process=20.0 Device=10.0
Transaction=10.0 MB
The first GLOBAL record is on 10/08/99 at 08:17 AM
The first NETIF record is on 10/08/99 at 08:17 AM
The first APPLICATION record is on 11/17/99 at 12:15 PM
The first PROCESS record is on 10/08/99 at 08:17 AM
The first DEVICE record is on 10/31/99 at 10:45 AM
The Transaction data file is empty
The default starting date & time = 10/08/99 11:50 AM (LAST
-30)
The default stopping date & time = 11/20/99 11:59 PM (LAST
-0)
Chapter 6 175
Extract Commands
lvolume
lvolume
Use the lvolume command to specify the type of logical volume data that
is being extracted or exported. (This command is used only on HP-UX
systems.)
The default is lvolume off.
Syntax
[on]
[detail]
lvolume [summary]
[both]
[off]
Parameters
Example
In this example, a new extracted log file named rx899 is created and any
existing file that has that name is purged. All logical volume data
collected from August 1 through August 31 is extracted.
logfile /var/opt/perf/datafiles/logglob
output rx899,purge
start 08/01/99
stop 08/31/99
global detail
lvolume detail
month 9908
To perform the above task using command line arguments, enter:
extract -f rx899,purge -gz -xm 9908
176 Chapter 6
Extract Commands
menu
menu
Use the menu command to print a list of the available extract
commands.
Syntax
menu
Example
Command Parameters Function
HELP [topic] Get information on commands and options
GUIDE Enter guided commands mode for novice users
LOGFILE [logname] Specify a log file to be processed
LIST [filename|*] Specify the listing file
OUTPUT [filename]
[,NEW/PURGE/APPEND] Specify a destination file
REPORT [filename][,SHOW] Specify an Export Format file for
"EXPORT"
GLOBAL [DETAIL/SUMMARY/BOTH/OFF] Extract GLOBAL records
APPLICATION [DETAIL/SUMMARY/BOTH/OFF] Extract APPLICATION
records
PROCESS [DETAIL/OFF/KILLED][APP=] Extract PROCESS records
DISK [DETAIL/SUMMARY/BOTH/OFF] Extract DISK DEVICE records
LVOLUME [DETAIL/SUMMARY/BOTH/OFF] Extract Logical VOLUME
records
NETIF [DETAIL/SUMMARY/BOTH/OFF] Extract Logical NETIF
records
CPU [DETAIL/SUMMARY/BOTH/OFF] Extract CPU records
FILESYSTEM [DETAIL/SUMMARY/BOTH/OFF] Extract FILESYSTEM
records
CONFIG [DETAIL/OFF] Export CONFIGURATION records
CLASS classname[DETAIL/SUMMARY/BOTH/OFF] Export classname
records
TRANSACTION [DETAIL/SUMMARY/BOTH/OFF] Extract TRANSACTION
records
START [startdate time] Specify a starting date and time for
SCAN
STOP [stopdate time] Specify an ending date and time for
SCAN
SHIFT [starttime - stoptime] [NOWEEKENDS] Specify daily
shift times
SHOW [ALL] Show the current program settings
Chapter 6 177
Extract Commands
menu
178 Chapter 6
Extract Commands
monthly
monthly
Use the monthly command to specify data extraction based on a calendar
month. During execution, this command sets the start and stop dates to
the proper dates, based on the month and year of the data extracted.
The name of the output file consists of the letters rxmo followed by the
four digits of the year and the two-digit number of the month being
extracted. For example, data extracted in March 1999 would be output to
a file named rxmo199903.
Syntax
monthly [yymm]
[mm]
Parameters
monthly yymm Extracts data for a specific month and year (where
yymm is a single number consisting of the last two
digits of the year and two-digit month number).
For example, to extract data for February 1999,
specify monthly 9902.
If you do not specify the log file before executing the monthly command,
the default logglob file is used.
How to Use It
Use the monthly command when you are extracting data for archiving
on a monthly basis.
The type of data extracted and summarized follows the normal rules for
the extract command and can be set before executing the monthly
command. These settings are honored unless a monthly output file
already exists. If it does, data is appended to it based on the type of data
that was originally specified.
Chapter 6 179
Extract Commands
monthly
The monthly command has a feature that opens the previous month's
extracted file and checks to see if it is filled--whether it contains data
extracted up to the last day of the month. If not, the monthly command
appends data to this file to complete the previous month's extraction.
For example, a monthly command is executed on May 7, 1999. This
creates a log file named rxmo199905 containing data from May 1
through the current date (May 7).
On June 4, 1999, another monthly command is executed. Before the
rxmo199906 file is created for the current month, the rxmo199905 file
from the previous month is opened and checked. When it is found to be
incomplete, data is appended to it to complete the extraction through
May 31, 1999. Then, the rxmo199906 file is created to hold data from
June 1, 1999 to the current date (June 4).
As long as you execute the monthly command at least once a month, this
feature will complete each month's file before creating the next month's
file. When you see two adjacent monthly files--for example, rxmo199905
(May) and rxmo199906 (June)--you can assume that the first file is
complete for that month and it can be archived and purged.
NOTE The monthly and extract month commands are similar in that they both
extract one calendar month's data. The monthly command ignores the
setting of the output command, using instead predefined output file
names. It also attempts to append missing data to the previous month's
extracted log file if it is still present on the system. The extract month
command, on the other hand, uses the settings of the output command. It
cannot append data to the previous month's extracted file since it does
not know its name.
Example
In this example, detail application data logged during May 1999 is
extracted.
logfile /var/opt/perf/datafiles/logglob
global off
application detail
monthly 9905
To perform the above task using command line arguments, enter:
extract -a -xm 9905
180 Chapter 6
Extract Commands
netif
netif
Use the netif command to specify the type of logical network interface
(LAN) data to extract or export. Netif data is logged in the logdev file.
The default is netif off.
Syntax
[on]
[detail]
netif [summary]
[both]
[off]
Parameters
Example
In this example, netif detail data collected from March 1, 2000 to June
30, 2000 during the hours 8:00 am to 5:00 pm on weekdays is extracted.
logfile /var/opt/perf/datafiles/logglob
start 03/01/00
stop 06/30/00
shift 8:00 AM - 5:00 PM noweekends
netif detail
extract
To perform the above task using command line arguments, enter:
extract -n -b 03/01/00 -e 6/30/00 -s 8:00 am - 5:00
noweekends -xt
Chapter 6 181
Extract Commands
output
output
Use the output command to specify the name of an output file for the
extract or export functions.
The optional second parameter specifies the action to be taken if an
output file with the same name exists.
Syntax
[,new]
output [filename [,purge]
] [,append]
Parameters
,new Specifies that the output file must be a new file. This
is the default action in batch mode. If a file with the
same name exists, the batch job terminates.
How to Use It
If you do not specify an action in batch mode, the default action,new is
used. In interactive mode, you are prompted to enter an action if a
duplicate file is found.
If you do not specify an output file, default output files are created. The
default output file names are:
For extract: rxlog
For export:
xfrdGLOBAL.ext
xfrsGLOBAL.ext
xfrdAPPLICATION.ext
xfrsAPPLICATION.ext
xfrdPROCESS.ext
182 Chapter 6
Extract Commands
output
xfrdDISK.ext
xfrsDISK.ext
xfrdLVOLUME.ext
xfrsLVOLUME.ext
xfrdNETIF.ext
xfrsNETIF.ext
xfrdCPU.ext
xfrsCPU.ext
xfrdFILESYSTEM.ext
xfrsFILESYSTEM.ext
xfrdTRANSACTION.ext
xfrsTRANSACTION.ext
xfrdCONFIGURATION.ext
where ext = asc (ASCII), dat (datafile), bin (binary), or wk1
(spreadsheet).
A special file name, stdout (or *), can be used with the export operation
to direct the output to the stdout file (normally your terminal or
workstation, although this can be redirected using shell commands).
output stdout
or
output *
To return the output to its default settings, type:
output default
or
output -
Chapter 6 183
Extract Commands
output
NOTE You can override the default output file names for exported files using
the output parameter in the export template file.
You should not output extract operation files to stdout, because they are
incompatible with ASCII devices. You should also not output binary or
WK1 formats of the export operation to the stdout file for the same
reason.
Care should be taken to avoid appending extracted data to an existing
exported data file and to avoid appending exported data to an existing
extracted file. Attempts to append the wrong data type will result in an
error condition.
Example
In this example, no output file is specified so the default output file,
rxlog is used for the application summary data being extracted. The
,purge option specifies that any existing output file should be purged.
extract>
logfile /var/opt/perf/datafiles/logglob
output rxlog,purge
global off
application summary
extract month 9905
To perform the above task using command line arguments, enter:
extract -f rxlog,purge -A -xm 9905
184 Chapter 6
Extract Commands
process
process
Use the process command to specify whether or not to extract or export
process data.
The default is process off.
Syntax
[on]
[off]
[killed]
Parameters
on Specifies that process data should be extracted or
exported.
detail Specifying process detail is the same as specifying
process on.
off Specifies that process data should not be extracted or
exported.
killed Specifies only processes that have an interest reason
that includes killed. (Processes that terminated in the
measurement interval.)
application Specifies only processes that belong to selected
applications. An application can be entered as a single
number or as a range of application numbers (7-9
means applications 7, 8, and 9). The application
number is determined by the order of the application
definition in the parm file when the data was collected.
If you are specifying multiple applications, separate
each one with a comma.
Chapter 6 185
Extract Commands
process
NOTE Process data can increase the size of an extracted log file significantly. If
you plan to copy the log file to a workstation for analysis, you might want
to limit the amount of process data extracted.
Example
In this example, the process command specifies processes that
terminated during an interval and belong to applications 1, 4, 6, 7, 8, or
10. Use the utility program’s scan command to find the application
numbers for specific applications.
process killed applications=1,4,6-8,10
186 Chapter 6
Extract Commands
quit
quit
Use the quit command to terminate the extract program. The quit
command is equivalent to the extract program’s exit command.
Syntax
quit
q
Chapter 6 187
Extract Commands
report
report
Use the report command to specify the export template file to be used
by the export function. If no export template file is specified, the default
export template file, reptfile, is used. The export template file is used
to specify various output format attributes used in the export function. It
also specifies which metrics will be exported.
If you are in interactive mode and specify no export template file, all
metrics for the data types requested will be exported in ASCII format.
Syntax
report [exporttemplatefile] [,show]
Parameters
,show Specifies that the field positions and starting columns
should be listed for all metrics specified in the export
template file. This listing can be used when export files
are processed by other programs.
How to Use It
When you issue this command, you are prompted by a message that asks
whether or not you want to validate metrics in the export template with
the previously specified log file. Validation ensures that the metrics
specified in the export template file exist in the log file. This allows you
to check for possible errors in the export template file. If no validation is
performed, this action is deferred until you perform an export.
NOTE The ,show parameter of the report command discussed here is different
from the show command discussed later.
188 Chapter 6
Extract Commands
sh
sh
Use sh to enter a shell command without exiting extract by typing sh
or an exclamation point(!) followed by a UNIX shell command.
Syntax
sh or ! [shell command]
Parameters
sh ls Executes the ls command and returns to extract.
The shell command is any system command.
!ls Same as above.
!ksh Starts a Korn shell. Does not return immediately to
extract. Type exit or CTRL-d Return to return to the
extract program.
How to Use It
Following the execution of the single command, you automatically return
to extract. If you want to issue multiple shell commands without
returning to extract after each one, you can start a new shell.
If you issue the sh command without the name of the shell command,
you are prompted to supply it. For example,
sh
enter SYSTEM command: ls
Chapter 6 189
Extract Commands
shift
shift
Use the shift command to limit data extraction to certain hours of the
day corresponding to work shifts and to exclude weekends (Saturday and
Sunday).
The default is shift all day to extract data for all day, every day
including weekends.
Syntax
[starttime-stoptime]
shift [all day]
[noweekends]
Parameters
The starttime and stoptime parameters are entered in the same
format as the time in the start command. Shifts that span midnight are
permitted. If starttime is scheduled after the stoptime, the shift will
start at the start time and proceed past midnight, ending at the
stoptime of the next day.
all day Specifies the default shift of 12:00 am - 12:00 am (or
00:00 -00:00 on a 24-hour clock).
noweekends Specifies the exclusion of data which was logged on
Saturdays and Sundays. If noweekends is entered in
conjunction with a shift that spans midnight, the
weekend will consist of those shifts that start on
Saturday or Sunday.
Example
In this example, disk detail data collected between 10:00 am and 4:00 pm
every day starting June 15, 1999 is extracted.
extract>
logfile /var/opt/perf/datafiles/logglob
global off
disk detail
shift 10:00 am - 4:00 PM
start 6/15/99
extract
190 Chapter 6
Extract Commands
shift
Chapter 6 191
Extract Commands
show
show
Use the show command to list the names of the opened files and the
status of the extract parameters that can be set.
Syntax
show [all]
NOTE The show command discussed here is different from the ,show parameter
of the report command discussed earlier.
Examples
Use show by itself to produce a list that may look like this:
Logfile: /var/opt/perf/datafiles/logglob
Output: Default
Report: Default
List: "stdout"
The default starting date & time = 10/08/99 12:00 AM (LAST -30)
The default stopping date & time = 11/20/99 11:59 PM (LAST -0)
The default shift = 12:00 AM - 12:00 PM
GLOBAL DETAIL records will be processed
APPLICATION. . . . . . . . . . NO records will be processed
PROCESS . . . . . . . . . . . NO records will be processed
192 Chapter 6
Extract Commands
show
Use show all to produce a more detailed list that may look like this:
Logfile: /var/opt/perf/datafiles/logglob
Global file: /var/opt/perf/datafiles/logglob,version D
Application file: /var/opt/perf/datafiles/logappl
Process file: /var/opt/perf/datafiles/logproc
Device file: /var/opt/perf/datafiles/logdev
Transaction file: /var/opt/perf/datafiles/logdev
Index file: /var/opt/perf/datafiles/logindx
System ID: homer
System Type 9000/715/ S/N 2223334442 O/S HP-UX B.10.20 A
Data collector: SCOPE/UX C.02.30
File Created: 10/08/99
Data Covers: 44 days to 11/20/99
Shift is: All Day
Data records available are:
Global Application Process Disk Volume Transaction
Maximum file sizes:
Global=10.0 Application=10.0 Process=20.0 Device=10.0
Transaction=10.0 MB
Output: Default
Report: Default
List: "stdout"
The default starting date & time = 10/08/99 11:50 AM (LAST -30)
The default stopping date & time = 11/20/99 11:59 PM(LAST - 0)
The default shift = 12:00 AM - 12:00 PM
GLOBAL...........DETAIL...........records will be processed
APPLICATION....................NO records will be processed
PROCESS........................NO records will be processed
DISK DEVICE....................NO records will be processed
LVOLUME........................NO records will be processed
TRANSACTION....................NO records will be processed
NETIF..........................NO records will be exported
CPU............................NO records will be processed
FILESYSTEM.....................NO records will be processed
Configuration ..................NO records will be exported
Export Report Specifications:
Interval = 3600, Separator = " "
Missing data will not be displayed
Headings will be displayed
Date/time will be formatted
Days to exclude: None
Chapter 6 193
Extract Commands
start
start
Use the start command to set a starting date and time for the extract
and export functions. The default starting date is the date 30 full days
before the last date in the log file, or if less than 30 days are present, the
date of the earliest record in the log file.
Syntax
[date [time]]
start [today [-day][time]]
[last [-days][time]]
[first [+days][time]]
Parameters
date The date format depends on the native language that is
configured for your system. If you do not use native
languages or you have set C as the default language,
the data format is mm/dd/yy (month/day/year) such as
09/30/99 for September 30, 1999, for the extract or
export function.
time The time format also depends on the native language
used. For the C language, the format is hh:mm am or
hh:mm pm (hour:minute in a 12-hour format with the
am or pm suffix). For example, 07:00 am is 7 o'clock in
the morning.
Twenty-four hour time is accepted in all languages. For
example, 23:30 would be accepted for 11:30 pm.
If the format of the date or time is unacceptable, you
are prompted with an example in the correct format.
If no start time is given, midnight (12:00 am) is
assumed. A starting time of midnight for a given day
starts at the beginning of that day (00:00 on a 24-hour
clock).
194 Chapter 6
Extract Commands
start
• weekly
• monthly
• yearly
• extract (If day, week, month, or year parameter is used)
• export (If day, week, month, or year parameter is used)
Example
In this example, the start command specifies June 5, 1999 8:00 am as
the start time of the first interval to be extracted. The output command
specifies an output file named myout.
logfile /var/opt/perf/datafiles/logglob
start 6/5/99 8:00 am
output myout
global detail
extract
Chapter 6 195
Extract Commands
stop
stop
Use the stop command to terminate an extract or export function at a
specified date and time.
The default stopping date and time is the last date and time recorded in
the log file.
Syntax
[date [time]]
start [today [-day][time]]
[last [-days][time]]
[first [+days][time]]
Parameters
date The date format depends on the native language that is
configured for your system. If you do not use native
languages or you have set C as the default language,
the data format is mm/dd/yy (month/day/year) such as
09/30/99 for September 30, 1999, for the extract or
export function.
time The time format also depends on the native language
used. For the C language, the format is hh:mm am or
hh:mm pm (hour:minute in a 12-hour format with the
am or pm suffix). For example, 07:00 am is 7 o'clock in
the morning.
Twenty-four hour time is accepted in all languages. For
example, 23:30 would be accepted for 11:30 pm.
If the format of the date of time is unacceptable, you
are prompted with an example in the correct format.
If no stop time is given, one minute before midnight
(11:59 pm) is assumed. A stopping time of midnight
(12:00 am) for a given day stops at the end of that day
(23:59 on a 24-hour clock).
196 Chapter 6
Extract Commands
stop
• weekly
• monthly
• yearly
• extract (If day, week, month, or year parameter is used)
• export (If day, week, month, or year parameter is used)
Example
In this example, the stop command specifies June 5, 1999 5:00 pm as
the stopping time of the last interval to be extracted. The output
command specifies an output file named myout.
extract>
logfile /var/opt/perf/datafiles/logglob
start 6/5/99 8:00 AM
stop 6/5/99 5:00 PM
output myout
global detail
extract
Chapter 6 197
Extract Commands
transaction
transaction
Use the transaction command to specify the type of transaction data
that is being extracted or exported.
Syntax
[on]
[detail]
transaction [summary]
[both]
[off]
Parameters
Example
A new extracted log file called rxmay99 is created on June 1, 1999. Any
existing file that has this name is purged. All raw transaction log file
data collected from May 1, 1999 to May 31, 1999 is extracted.
extract>
logfile /var/opt/perf/datafiles/logglob
output rxmay99,purge
global detail
transaction detail
month 9905
198 Chapter 6
Extract Commands
weekdays
weekdays
Use the weekdays command to exclude data for specific days from being
exported (day 1 = Sunday).
Syntax
weekdays [1|2.....7]
How to Use It
If you want to export data from only certain days of the week, use this
command to exclude the days from which you do not want data. Days
have the following values:
Sunday =1
Monday =2
Tuesday =3
Wednesday =4
Thursday =5
Friday =6
Saturday =7
For example, if you want to export data that was logged only on Monday
through Thursday, exclude data from Friday, Saturday, and Sunday from
your export.
Example
In this example, any detailed global data logged on Tuesdays and
Thursdays is excluded from the export. The output export file contains
the global metrics specified in the myrept export template file.
extract>
logfile /var/opt/perf/datafiles/logglob
global detail
report myrept
weekdays 35
export
Chapter 6 199
Extract Commands
weekly
weekly
Use the weekly command to specify data extraction based on a calendar
week. A week is defined as seven days starting on Monday and ending on
Sunday.
During execution, this command sets the start and stop dates to the
proper dates, based on the week and year of the extracted data.
Syntax
weekly [yyww]
[ww]
Parameters
weekly Extracts the current week's data (the default).
weekly ww Extracts data for a specific week from this year's data
(where ww is any number from 01 to 53).
weekly yyww Extracts data for a specific week and year (where yyww
is a single number consisting of the last two digits of
the year and the two-digit week-of-the-year number).
For example, the 20th week of 1999 would be weekly
9920.
If you do not specify the log file before executing the weekly command,
the default logglob file in the datafiles directory is used.
How to Use It
Use the weekly command when you are extracting data for archiving on
a weekly basis.
The name of the output file consists of the letters rxwe followed by the
last two digits of the year, and the two-digit week number for the week
being extracted. For example, the 12th week of 1999 (from Monday,
March 22 to Sunday, March 29) would be output to a file named
rxwe9912.
200 Chapter 6
Extract Commands
weekly
The type of data extracted and summarized follow the normal rules for
the extract command and can be set before executing the weekly
command. These settings are honored unless a weekly output file
already exists. If it does, data is appended to it, based on the type of data
selected originally.
The weekly command has a feature that opens the previous week's
extracted file and checks to see if it is filled--whether it contains data
extracted up to the last day of the week. If not, the weekly command
appends data to this file to complete the previous week's extraction.
For example, a weekly command is executed on Thursday, May 20, 1999.
This creates a log file named rxwe199920 containing data from Monday,
May 17 through the current date (May 20).
On Wednesday, May 26, 1999, another weekly command is executed.
Before the rxwe199921 file is created for the current week, the
rxwe199920 file from the previous week is opened and checked. When it
is found to be incomplete, data is appended to it to complete the
extraction through Sunday, May 23, 1999. Then, the rxwe199921 file is
created to hold data from Monday, May 24, 1999 to the current date (May
26).
As long as you execute the weekly command at least once a week, this
feature will complete each week's file before creating the next week's file.
When you see two adjacent weekly files (for example, rxwe199920 and
rxwe199921), you can assume that the first file is complete for that week,
and it can be archived and purged.
NOTE The weeks are numbered based on their starting day. Thus, the first
week of the year (week 01) is the week starting on the first Monday of
that year. Any days before that Monday belong to the last week of the
previous year. The weekly and extract week commands are similar in
that they both extract one calendar week's data. The weekly command
ignores the setting of the output command, using instead predefined
output file names. It also attempts to append missing data to the
previous week's extracted log file if it is still present on the system. The
extract week command, on the other hand, uses the settings of the
output command. It cannot append data to the previous week's extracted
file because it does not know its name. The output file is named rxwe
followed by the current year (yyyy) and week of the year (ww).
Chapter 6 201
Extract Commands
weekly
Example
In this example, the weekly command causes the current week’s data to
be extracted and complete the previous week’s extracted file, if it is
present.
extract>
logfile /var/opt/perf/datafiles/logglob
global detail
application detail
process detail
weekly
To perform the above task using command line arguments, enter:
extract -gap -xw
202 Chapter 6
Extract Commands
yearly
yearly
Use the yearly command to specify data extraction based on a calendar
year.
During execution, the command sets the start and stop dates to the
proper dates, based on the year being extracted.
Syntax
yearly [yyyy]
[yy]
Parameters
yearly Extracts the current year's data (the default).
yearly yy Extracts a specific year's data (where yy is a number
from 00 to 99).
The specifications 00 to 27 assume the years 2000 to
2027, whereas 71 to 99 assume the years 1971 to 1999.
yearly yyyy Extracts a specific year's data (where yyyy is the
full-year numbered 1971 to 2027).
If you do not specify the log file before executing the yearly command,
the default logglob file is used.
How to Use It
Use the yearly command when you are extracting data for archiving on
a yearly basis.
The name of the output file consists of the letters rxyr followed by the
four digits of the year being extracted. Thus, data from 1999 would be
output to a file named rxyr1999.
The type of data extracted and summarized follow the normal rules for
the extract command and can be set before executing the yearly
command. These settings are honored unless a yearly output file already
exists. If it does, data is appended to it, based upon the type of data
selected originally.
Chapter 6 203
Extract Commands
yearly
The yearly command has a feature that opens the previous year's
extracted file and checks to see if it is filled--whether it contains data
extracted up to the last day of the year. If not, the yearly command
appends data to this file to complete the previous year's extraction.
For example, a yearly command was executed on December 15, 1998.
This created a log file named rxyr1998 containing data from January 1,
1998 to the current date (December 15).
On January 5, 1999, another yearly command is executed. Before the
rxyr1999 file is created for the current year, the rxyr1998 file from the
previous year is opened and checked. When it is found to be incomplete,
data is appended to it to complete its extraction until December 31, 1998.
Then, the rxyr1999 file is created to hold data from January 1, 1999 to
the current date (January 5).
As long as you execute the yearly command at least once a year, this
feature will complete each year's file before creating the next year's file.
When you see two adjacent yearly files (for example, rxyr1998 and
rxyr1999), you can assume that the first file is complete for that year,
and it can be archived and purged.
The previous paragraph is true only if the raw log files are sized large
enough to hold one full year of data. It would be more common to size the
raw log files smaller and execute the yearly command more often (such
as once a month).
NOTE The yearly and extract year commands are similar in that they both
extract one calendar year's data. The yearly command ignores the
setting of the output command, using instead predefined output file
names. It also attempts to append missing data to the previous year's
extracted log file if it is still present on the system. The extract year
command, on the other hand, will use the settings of the output
command. It cannot append data to the previous year's extracted file
since it does not know its name.
204 Chapter 6
Extract Commands
yearly
Example
In this example, application and global detail data is appended to the
existing yearly summary file (or creates it, if necessary). The output file
is rxyryyyy (where yyyy represents the current year).
extract>
logfile /var/opt/perf/datafiles/logglob
global detail
application detail
process off
yearly
Chapter 6 205
Extract Commands
yearly
206 Chapter 6
7 Performance Alarms
Chapter 7 207
Performance Alarms
Introduction
Introduction
This chapter describes what an alarm is, the syntax used to define an
alarm, how an alarm works, and how alarms can be used to monitor
performance.
You can use OV Performance Agent to define alarms. These alarms notify
you when scopeux or DSI metrics meet or exceed conditions that you
have defined.
To define alarms, you specify conditions on each OV Performance Agent
system that when met, trigger an alert or action. You define alarms in
the OV Performance Agent alarm definitions file, alarmdef.
As data is logged by scopeux or DSI, it is compared to the alarm
definitions to determine if a condition is met. When this occurs an alert
or action is triggered.
With the real time alarm generator you can configure where you want
alert notifications sent and whether you want local actions performed.
SNMP traps can be sent to HP OpenView Network Node Manager. Alert
notifications can be sent to OpenView Operations (OVO). Local actions
can be performed on your OV Performance Agent system.
You can analyze historical log file data against the alarm definitions and
report the results using the utility program's analyze command.
208 Chapter 7
Performance Alarms
Processing Alarms
Processing Alarms
As performance data is collected by OV Performance Agent, it is
compared to the alarm conditions defined in the alarmdef file to
determine whether the conditions have been met. When a condition is
met, an alarm is generated and the actions defined for alarms (ALERTs,
PRINTs, and/or EXECs) are performed. You can set up how you want the
alarm information communicated once an alarm is triggered. For
example, you can:
Chapter 7 209
Performance Alarms
Processing Alarms
Alarm Generator
The OV Performance Agent alarm generator handles the communication
of alarm notifications. The alarm generator consists of the alarm
generator server (perfalarm), the alarm generator database server
(agdbserver), the alarm generator database (agdb), and the utility
program agsysdb.
The agdb contains a list of OV Performance Manager analysis nodes (if
any) to which you communicate alarm notifications and various on/off
flags that you set to define if and where you want the alarm notifications
sent. It also contains a list of SNMP trap destination. The agsysdb
program is used for displaying and changing the actions taken by alarm
events.
Use the following command line option to see a list showing where alert
notifications are being sent:
agsysdb -l
210 Chapter 7
Performance Alarms
Processing Alarms
message to OVO's event browser. If the OVO agent is not running on the
OV Performance Agent system, the alarm generator does not try to send
alert notifications to OVO and local actions are executed.
You can change the default to stop sending information to OVO, even
though an OVO agent is running on the OV Performance Agent system,
using the command:
agsysdb -ovo OFF
OVO Flag
Chapter 7 211
Performance Alarms
Processing Alarms
212 Chapter 7
Performance Alarms
Processing Alarms
Chapter 7 213
Performance Alarms
Alarm Definition Components
214 Chapter 7
Performance Alarms
Alarm Syntax Reference
Chapter 7 215
Performance Alarms
Alarm Syntax Reference
Conventions
• Braces ({ }) indicate that one of the choices is required.
• Brackets ([ ]) indicate an optional item.
• Items separated by commas within brackets or braces are options.
Choose only one.
• Italics indicate a variable name that you replace.
• All syntax keywords are in uppercase.
Common Elements
The following elements are used in several statements in the alarm
syntax and are described below.
• comments
• compound statements
• conditions
• constants
• expressions
• metric names
• messages
Comments
You can precede comments either by double forward slashes (//) or the
pound sign (#). In both cases, the comment ends at the end of the line.
For example:
# any text or characters
or
// any text or characters
216 Chapter 7
Performance Alarms
Alarm Syntax Reference
Compound Statements
Compound statements allow a list of statements to be executed as a
single statement. A compound statement is a list of statements inside
braces ({}). Use the compound statement with the IF statement, the
LOOP statement, and the START, REPEAT, and END clauses of the
ALARM statement. Compound statements cannot include ALARM and
SYMPTOM statements.
{
statement
statement
}
In the example below, highest_cpu = 0 defines a variable called
highest_cpu. The highest_cpu value is saved and notifies you only
when that highest_cpu value is exceeded by a higher highest_cpu
value.
highest_cpu = 0
IF gbl_cpu_total_util > highest_cpu THEN
// Begin compound statement
{
highest_cpu = gbl_cpu_total_util
ALERT "Our new high CPU value is ", highest_cpu, "%"
}
// End compound statement
Conditions
A condition is defined as a comparison between two items.
item1 {>, <, >=, <=, ==, !=}item2
[AND, OR[item3 {>, <, >=, <=, ==, !=}item4]]
where "==" means "equal", and "!=" means "not equal".
Conditions are used in the ALARM, IF, and SYMPTOM statements. An
item can be a metric name, a numeric constant, an alphanumeric string
enclosed in quotes, an alias, or a variable. When comparing
alphanumeric items, only == or != can be used as operators.
Chapter 7 217
Performance Alarms
Alarm Syntax Reference
Constants
Constants can be either numeric or alphanumeric. An alphanumeric
constant must be enclosed in double quotes. For example:
345
345.2
"Time is"
Constants are useful in expressions and conditions. For example, you
may want to compare a metric against a constant numeric value inside a
condition to generate an alarm if it is too high, such as
gbl_cpu_total_util > 95
Expressions
Arithmetic expressions perform one or more arithmetic operations on
two or more operands. You can use an expression anywhere you would
use a numeric value. Legal arithmetic operators are:
+, -, *, /
Parentheses can be used to control which parts of an expression are
evaluated first.
For example:
Iteration + 1
gbl_cpu_total_util - gbl_cpu_user_mode_util
( 100 - gbl_cpu_total_util ) / 100.0
Metric Names
When you specify a metric name in an alarm definition, the current
value of the metric is substituted. Metric names must be typed exactly as
they appear in the metric definition, except for case sensitivity. Metrics
definitions can be found in the HP OpenView Performance Agent
Dictionary of Operating Systems Performance Metrics. If you are using
OV Performance Manager, choose On Metrics from the OV Performance
Manager help menu to display a list of metrics by platform.
It is recommended that you use fully-qualified metric names if the
metrics are from a data source other than the SCOPE data source (such
as DSI metrics).
The format for specifying a fully qualified metric is:
data_source:instance(class):metric_name
218 Chapter 7
Performance Alarms
Alarm Syntax Reference
NOTE When specifying fully qualified multi-instance metrics and using aliases
within aliases, if one of the aliases has a class identifier, we recommend
you use the syntax shown in this example:
alias my_fs="/dev/vg01/lvol1(LVOLUME)"
alarm my_fs:LV_SPACE_UTIL > 50 for 5 minutes
If you use an application name that has an embedded space, you must
replace the space with an underscore (_). For example, application 1
must be changed to application_1. For more information on using
names that contain special characters, or names where case is
significant, see “ALIAS Statement” on page 240.
If you had a disk named “other” and an application named “other”, you
would need to specify the class as well as the instance:
other (disk):metric_1
A global metric in an extracted log file (where scope_extract is the data
source name) would be specified this way:
scope_extract:application_1:metric_1
A DSI metric would be specified this way:
dsi_data_source:dsi_class:metric_name
Chapter 7 219
Performance Alarms
Alarm Syntax Reference
NOTE Any metric names containing special characters (such as asterisks) must
be aliased before they are specified.
Messages
A message is the information sent by a PRINT or ALERT statement. It
can consist of any combination of quoted alphanumeric strings, numeric
constants, expressions, and variables. The elements in the message are
separated by commas. For example:
RED ALERT "cpu utilization=", gbl_cpu_total_util
Numeric constants, metrics, and expressions can be formatted for width
and number of decimals. Width specifies how wide the field should be
formatted; decimals specifies how many decimal places to use. Numeric
values are right-justified. The - (minus sign) specifies left-justification.
Alphanumeric strings are always left-justified. For example:
metric names [|[-]width[|decimals]]
gbl_cpu_total_util|6|2 formats as '100.00'
(100.32 + 20)|6 formats as ' 120'
gbl_cpu_total_util|-6|0 formats as '100 '
gbl_cpu_total_util|10|2 formats as ' 99.13'
gbl_cpu_total_util|10|4 formats as ' 99.1300'
220 Chapter 7
Performance Alarms
Alarm Syntax Reference
ALARM Statement
The ALARM statement defines a condition or set of conditions and a
duration for the conditions to be true. Within the ALARM statement, you
can define actions to be performed when the alarm condition starts,
repeats, and ends. Conditions or events that you might want to define as
alarms include:
• when global swap space has been nearly full for 5 minutes
• when the memory paging rate has been too high for 1 interval
• when your CPU has been running at 75 percent utilization for the
last ten minutes
Syntax
ALARM condition [[AND,OR]condition]
FOR duration{SECONDS, MINUTES}
[TYPE="string"]
[SERVICE="string"]
[SEVERITY=integer]
[START action]
[REPEAT EVERY duration {SECONDS, MINUTES} action]
[END action]
Chapter 7 221
Performance Alarms
Alarm Syntax Reference
• START, REPEAT, and END are keywords used to specify what action
to take when alarm conditions are met, met again, or stop. You
should always have at least one of START, REPEAT, or END in an
ALARM statement. Each of these keywords is followed by an action.
• action – The action most often used with an ALARM START,
REPEAT, or END is the ALERT statement. However, you can also
use the EXEC statement to mail a message or run a batch file, or a
PRINT statement if you are analyzing historical log files with the
utility program. Any syntax statement is legal except another
ALARM.
START, REPEAT, and END actions can be compound statements. For
example, you can use compound statements to provide both an
ALERT and an EXEC.
• Conditions – A condition is defined as a comparison between two
items.
222 Chapter 7
Performance Alarms
Alarm Syntax Reference
Chapter 7 223
Performance Alarms
Alarm Syntax Reference
224 Chapter 7
Performance Alarms
Alarm Syntax Reference
WARNING Do not use metrics that are logged at different intervals in the
same alarm. For example, you should not loop on a process
(logged at 1-minute intervals) based on the value of a global
metric (logged at 5-minute intervals) in a statement like this:
IF global_metric THEN
PROCESS LOOP...
The different intervals cannot be synchronized as you might
expect, so results will not be valid.
Chapter 7 225
Performance Alarms
Alarm Syntax Reference
ALERT Statement
The ALERT statement allows a message to be sent to OV Performance
Manager, Network Node Manager, or OVO. It also allows the creation
and deletion of the alarm symbols in the Network Node Manager map
associated with OV Performance Manager and controls the color of the
alarm symbols, depending on the severity of the alarm. (For more
information, see OV Performance Manager online Help.)
The ALERT statement is most often used as an action within an
ALARM. It could also be used within an IF statement to send a message
as soon as a condition is detected instead of after the duration has
passed. If an ALERT is used outside of an ALARM or IF statement, the
message will be sent at every interval.
Syntax
[RED, CRITICAL, ORANGE, MAJOR, YELLOW, MINOR, CYAN,
WARNING, GREEN, NORMAL, RESET] ALERT message
226 Chapter 7
Performance Alarms
Alarm Syntax Reference
How It Is Used
The ALERT can also trigger an SNMP trap to be sent to Network Node
Manager or a message to be sent to OVO, depending on how you
configured your alarm generator. If you configured OV Performance
Manager to receive alarms from this system, the ALERT sends a
message to the OV Performance Manager Alarms window.
If an ALERT statement is used outside of an ALARM statement, the
alert message will show up in the OV Performance Manager Alarms
window but no symbol will be created in the Network Node Manager
map.
For alert messages sent to OVO, the WARNINGS will be displayed in
blue in the message browser
Example
An typical ALERT statement is:
RED ALERT "CPU utilization = ", gbl_cpu_total_util
If you have OV Performance Manager and Network Node Manager, this
statement creates a red alarm symbol in the Network Node Manager
map associated with OV Performance Manager and sends a message to
the OV Performance Manager Alarms window that reads:
CPU utilization = 85.6
Chapter 7 227
Performance Alarms
Alarm Syntax Reference
EXEC Statement
The EXEC statement allows you to specify a UNIX command to be
performed on the local system. For example, you could use the EXEC
statement to send mail to an IT administrator each time a certain
condition is met.
EXEC should be used within an ALARM or IF statement so the UNIX
command is performed only when specified conditions are met. If an
EXEC statement is used outside of an ALARM or IF statement, the
action will be performed at unpredictable intervals.
Syntax
EXEC "UNIX command"
228 Chapter 7
Performance Alarms
Alarm Syntax Reference
NOTE Be careful when using the EXEC statement with commands or scripts
that have high overhead if it will be performed often.
The alarm generator executes the command and waits until it completes
before continuing. We recommend that you not specify commands that
take a long time to complete.
Chapter 7 229
Performance Alarms
Alarm Syntax Reference
PRINT Statement
The PRINT statement allows you to print a message from the utility
program using its analyze function. The alarm generator ignores the
PRINT statement.
Syntax
PRINT message
230 Chapter 7
Performance Alarms
Alarm Syntax Reference
IF Statement
Use the IF statement to define a condition using IF-THEN logic. The IF
statement should be used within the ALARM statement. However, it can
be used by itself or any place in the alarmdef file where IF-THEN logic
is needed.
If you specify an IF statement outside of an ALARM statement, you do
not have control over how frequently it gets executed.
Syntax
IF condition THEN action [ELSE action]
Chapter 7 231
Performance Alarms
Alarm Syntax Reference
WARNING Do not use metrics that are logged at different intervals in the
same statement. For instance, you should not loop on a process
(logged at 1-minute intervals) based on the value of a global
metric (logged at 5-minute intervals) in a statement like this:
IF global_metric THEN
PROCESS LOOP ...
The different intervals cannot be synchronized as you might
expect, so results will not be valid.
232 Chapter 7
Performance Alarms
Alarm Syntax Reference
LOOP Statement
The LOOP statement goes through multiple-instance data types and
performs the action defined for each instance.
Syntax
{APPLICATION, PROCESS, LVOLUME, DISK, CPU, FILESYSTEM,
TRANSACTION, NETIF}
LOOP
action
Chapter 7 233
Performance Alarms
Alarm Syntax Reference
highest_cpu = 0
APPLICATION loop
IF app_cpu_total_util > highest_cpu THEN
{
highest_cpu = app_cpu_total_util
big_app = app_name
ALERT "Application ", app_name, " has the highest cpu
util at ",highest_cpu_util|5|2, "%"
}
ALARM highest_cpu > 50 for 15 minutes
START
RED ALERT big_app, " is the highest CPU user at ",
highest_cpu, "%"
REPEAT EVERY 15 minutes
CYAN ALERT big_ap, " is the highest CPU user at ",
highest_cpu, "%"
END
RESET ALERT "No applications using excessive cpu"
234 Chapter 7
Performance Alarms
Alarm Syntax Reference
INCLUDE Statement
Use the INCLUDE statement to include another alarm definitions file
along with the default alarmdef file.
Syntax
INCLUDE "filename"
where filename is the name of another alarm definitions file. The file
name must always be fully qualified.
How It Is Used
The INCLUDE statement could be used to separate logically distinct sets
of alarm definitions into separate files.
Example
For example, if you have some alarm definitions in a separate file for
your transaction metrics and it is named
trans_alarmdef1
You can include it by adding the following line to the alarm definitions in
your alarmdef1 file:
INCLUDE "/var/opt/perf/trans_alarmdef1"
Chapter 7 235
Performance Alarms
Alarm Syntax Reference
USE Statement
You can add the USE statement to simplify the use of metric names in
the alarmdef file when data sources other than the default SCOPE data
source are referenced. This allows you to specify a metric name without
having to include the data source name.
The data source name must be defined in the datasources file. The
alarmdef file will fail its syntax check if an invalid or unavailable data
source name is encountered.
NOTE The appearance of a USE statement in the alarmdef file does not imply
that all metric names that follow will be from the specified data source.
Syntax
USE "datasourcename"
How It Is Used
As the alarm generator (perfalarm) checks the alarmdef file for valid
syntax, it builds an ordered search list of all data sources that are
referenced in the file. perfalarm sequentially adds entries to this data
source search list as it encounters fully-qualified metric names or USE
statements. This list is subsequently used to match metric names that
are not fully qualified with the appropriate data source name. The USE
statement provides a convenient way to add data sources to perfalarm's
search list, which then allows for shortened metric names in the
alarmdef file. For a discussion of metric name syntax, see “Metric
Names” on page 218.
perfalarm's default behavior for matching metric names to a data source
is to look first in the SCOPE data source for the metric name. This
implied USE "SCOPE" statement is executed when perfalarm encounters
the first metric name in the alarmdef file. This feature enables a default
search path to the SCOPE data source so that SCOPE metrics can be
referenced in the alarmdef file without the need to fully qualify them.
This is shown in the following example on the next page.
236 Chapter 7
Performance Alarms
Alarm Syntax Reference
Chapter 7 237
Performance Alarms
Alarm Syntax Reference
In the example above, the order of the statements in the alarmdef file
has changed. The USE "ORACLE7" statement is defined before any
metric names are referenced, therefore the ORACLE7 data source is
added as the first data source in the search list of data sources. The
implied USE "SCOPE" statement is executed when perfalarm
encounters the first metric name "gbl_cpu_total_util." Because the
GBL_CPU_TOTAL_UTIL metric name is not fully-qualified, perfalarm
sequentially searches through the list of data sources starting with
ORACLE7. ORACLE7 does not contain that metric name so the SCOPE
data source is searched next and a match is found.
perfalarm continues checking the rest of the alarmdef file. When
perfalarm encounters the “ActiveTransactions”" metric, it
sequentially searches the list of data sources starting with ORACLE7. A
match is found and perfalarm continues searching the rest of the
alarmdef file. If perfalarm does not find a match in any data source for
a metric name (that is not fully-qualified), an error message will be
printed and perfalarm terminates.
Be careful how you use the USE statement when multiple data sources
contain the same metric names. perfalarm sequentially searches the list
of data sources. If you are defining alarm conditions from different data
sources that use the same metric names, you must qualify the metric
names with their data source names to guarantee that the metric value
is retrieved from the correct data source. This is shown in the following
example where the metric names in the alarm statements each include
their data sources.
ALARM ORACLE7:ActiveTransactions >= 95 FOR 5 MINUTES
START RED ALERT "Nearing limit of transactions for
ORACLE7"
ALARM FINANCE:ActiveTransactions >= 95 FOR 5 MINUTES
START RED ALERT "Nearing limit of transactions for
FINANCE"
238 Chapter 7
Performance Alarms
Alarm Syntax Reference
VAR Statement
The VAR statement allows you to define a variable and assign a value to
it.
Syntax
[VAR] name = value
• name — Variable names must begin with a letter and can include
letters, digits, and the underscore character. Variable names are not
case-sensitive.
• value — If the value is an alphanumeric string, it must be enclosed
in quotes.
How It Is Used
VAR assigns a value to the user variable. If the variable did not
previously exist, it is created.
Once defined, variables can be used anywhere in the alarmdef file.
Examples
You can define a variable by assigning something to it. The following
example defines the numeric variable highest_CPU_value by assigning
it a value of zero.
highest_CPU_value = 0
The next example defines the alphanumeric variable my_name by
assigning it an empty string value.
my_name = ""
Chapter 7 239
Performance Alarms
Alarm Syntax Reference
ALIAS Statement
The ALIAS statement allows you to substitute an alias if any part of a
metric name (class, instance, or metric) has a case-sensitive name or a
name that includes special characters. These are the only circumstances
where the ALIAS statement should be used.
Syntax
ALIAS name = "replaced-name"
• name — The name must begin with a letter and can include letters,
digits, and the underscore character.
• replaced-name — The name that must be replaced by the ALIAS
statement to make it uniquely recognizable to the alarm generator.
How It Is Used
Because of the way the alarmdef file is processed, if any part of a metric
name (class, instance, or metric name) can be identified uniquely only by
recognizing uppercase and lowercase, you will need to create an alias.
You will also need to create an alias for any name that includes special
characters. For example, if you have applications called "BIG" and "big,"
you'll need to alias "big" to ensure that they are viewed as different
applications. You must define the alias somewhere in the alarmdef file
before the first instance of the name you want substituted.
Examples
Because you cannot use special characters or upper and lower case in the
syntax, using the application name "AppA" and "appa" could cause errors
because the processing would be unable to distinguish between the two.
You would alias "AppA" to give it a uniquely recognizable name. For
example:
ALIAS appa_uc = "AppA"
ALERT "CPU alert for AppA.util is",appa_uc:app_cpu_total_util
If you are using an alias for an instance with a class identifier, include
both the instance name and the class name in the alias. The following
example shows the alias for the instance name 'other' and the class
name 'APPLICATION.'
ALIAS my_app="other(APPLICATION)"
ALERT my_app:app_cpu_total_util > 50 for 5 minutes
240 Chapter 7
Performance Alarms
Alarm Syntax Reference
SYMPTOM Statement
A symptom provides a way to set a single variable value based on a set of
conditions. Whenever any of the conditions is true, its probability value
is added to the value of the symptom variable.
Syntax
SYMPTOM variable
RULE condition PROB probability
[RULE condition PROB probability]
.
.
.
Chapter 7 241
Performance Alarms
Alarm Syntax Reference
How It Is Used
The sum of all probabilities where the condition between measurement
and value is true is the probability that the symptom is occurring.
Example
SYMPTOM CPU_Bottleneck
RULE gbl_cpu_total_util > 75 PROB 25
RULE gbl_cpu_total_util > 85 PROB 25
RULE gbl_cpu_total_util > 90 PROB 25
RULE gbl_run_queue > 3 PROB 50
IF CPU bottleneck > 50 THEN
CYAN ALERT "The CPU symptom is: ", CPU_bottleneck
242 Chapter 7
Performance Alarms
Alarm Definition Examples
Chapter 7 243
Performance Alarms
Alarm Definition Examples
244 Chapter 7
Performance Alarms
Alarm Definition Examples
Chapter 7 245
Performance Alarms
Customizing Alarm Definitions
a. Type utility
b. At the prompt, type
checkdef
This checks the alarm syntax and displays errors or warnings if
there any problems with the file.
4. In order for the new alarm definitions to take affect, type:
ovpa restart alarm
This causes the alarm generator to stop, restart, and read the
customized alarmdef file.
You can use a unique set of alarm definitions for each OV Performance
Agent system, or you can choose to standardize monitoring of a group of
systems by using the same set of alarm definitions across the group.
The best way to learn about performance alarms is to experiment with
adding new alarm definitions or changing the default alarm definitions.
246 Chapter 7
8 Communicating Across a
Firewall
Chapter 8 247
Communicating Across a Firewall
Introduction
Introduction
OV Performance Agent (OVPA) now uses HTTP 1.1 based
communications interface for data access between client and server
applications. This interface is flexible, since it can use proxies, requires
fewer ports and is firewall friendly. This replaces the functions that were
implemented in previous versions of OVPA by the perflbd and
rep_server daemons. These daemons, and their dependency on the DCE
subsystem can still be used by all UNIX systems except for OVPA for
Linux.
In general, a firewall may be defined as a method for filtering the flow of
data communications between one network and another. There are
different ways to configure the HTTP communication in a firewall
environment. The standard recommended way is to use HTTP proxies for
OVPA datacomm through a firewall. This simplifies the configuration by
using proxies that are often already in use in your environment. The
firewall must be open for exactly one port if proxies are to be used in both
directions.
In a typical remote communication a client, using the source port,
connects to a server that is listening on the destination port on a remote
system. For firewall configuration it is important to know which system
initiates the communication client) and which receives communication
requests server), so that the firewall rules can be set up accordingly.
Figure 8-1 shows how OVPA communicates with Reporter (version 3.0 or
later) and OV Performance Manager (OVPM version 4.0 or later)
through a firewall. OVPA is an HTTP server. Reporter and OVPM are
HTTP clients. If an HTTP proxy is used, Reporter and OVPM
communicate with OVPA via the proxy.
248 Chapter 8
Communicating Across a Firewall
Introduction
Firewall
inside outside
Server
HTTP
Server
OV OVPA
Reporter 4.0 or
3.0 or later later
HTTP
Proxy
Clients
OVPM
4.0 or
later
OVPM version 3.x uses the PerfView technology. PerfView does not use
the new datacomm components, but it will connect to OV Performance
Agent 4.0 and later for all UNIX platforms except for OVPA for Linux. In
the future, OVPM 3.x will be discontinued.
NOTE For Linux users, if you cannot upgrade OVPM 3.x to OVPM 4.0 or later,
you must access the OVPA for Linux data locally via the extract
program’s export function. Likewise, OVPA for Linux will not send
alarm notifications to the PerfView monitor.
Chapter 8 249
Communicating Across a Firewall
Introduction
Source Destination
Source Destination Protocol Description
Port Port
250 Chapter 8
Communicating Across a Firewall
Introduction
• For UNIX systems with Reporter and OVPM, refer to the Reporter
and OVPM system documentation for the location of the
default.txt file.
Chapter 8 251
Communicating Across a Firewall
Introduction
OR
/opt/perf/bin/ovpa restart
• With HTTP Proxy – This is the recommended way. See the section
“Configure Reporter/OVPM with HTTP Proxy” .
• Without HTTP Proxy – This is not the recommended way. See the
section “Configure Reporter/OVPM without HTTP Proxy” .
252 Chapter 8
Communicating Across a Firewall
Introduction
In this example, the proxy web-proxy will be used with port 8088 for
every server (*) except requests for the local machine (localhost) and
requests internal to HP (matching *.hp.com, for example www.hp.com.
1. Locate the lines that apply to CLIENT_PORT and uncomment the line
;CLIENT_PORT =.
2. Specify the port range for the CLIENT_PORT parameter. For example:
CLIENT_PORT = <port range>
Where <port range> is the range of ports you want to use. For
example:
CLIENT_PORT = 14000-14003
Chapter 8 253
Communicating Across a Firewall
Introduction
Other Considerations
254 Chapter 8
Communicating Across a Firewall
Introduction
[DEFAULT]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The PROXY parameter may be set in the DEFAULT section.
; Defines which proxy and port number to use for a given hostname.
; Format is proxy:port +(a)-(b); proxy2:port2 +(c)-(d); ...
; 'a', 'b', 'c' and 'd' are comma separated lists of hostnames,
; networks, and/or IP addresses that apply to the proxy. Multiple
; proxies may be defined for one PROXY key. '-' before the list
; denotes those entities that do not use this proxy, '+' before the
; list denotes entities that do use this proxy. The first matching
; proxy is used.
;
;PROXY = web-proxy.hp.com:8088-(localhost,*.hp.com)+(*)
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The following are examples of parameters that may be set
; by a client application. These should be set in the client
; specific section (see below).
;
; Local port number the client will bind to.
; CLIENT_PORT = 16000
; Range of local ports the client may bind to.
; NOTE: Range syntax is only valid from BBC 2.5.2.0 or
; greater
;CLIENT_PORT = 16000-16010
; Local address the client will bind to.
;CLIENT_BIND_ADDR = 10.10.10.10
;
;
; The following are examples of parameters that may be set
; by a server application. These should be set in the server
Chapter 8 255
Communicating Across a Firewall
Introduction
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; The following settings are for HP internal use only
; or are used for local communication.
; These settings don't have to be changed.
;
[com.hp.openview.OvAgency.OvAgencyCommand]
SERVER_PORT = 6600
[com.hp.openview.OvAgency.OvPolicyFileObject]
SERVER_PORT = 6600
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; reserved for future use - not used at all in OVOW 7.0
;
[com.hp.openview.bbc.FxServer]
SERVER_PORT = 6500
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Local Location Broker (LLB): used by all components
;
; NOTE: The LLB 'SERVER_PORT' value must
; be the same on all nodes.
;
[com.hp.openview.bbc.LLBServer]
SERVER_PORT = 383
;SERVER_BIND_ADDR =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; The following settings are the default settings for all HP
; components that use the HP OpenView HTTP-based communication
;
; OVO embedded performance component
;
[com.hp.openview.Coda]
SERVER_PORT = 381
;SERVER_BIND_ADDR =
256 Chapter 8
Communicating Across a Firewall
Introduction
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; used by various clients of the embedded performance component:
; OVOW embedded reporter and grapher, OV Reporter, OV Performance
; Manager
;
[com.hp.openview.CodaClient]
;CLIENT_PORT =
;CLIENT_BIND_ADDR =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; used by service discovery agent and server component
;
[com.hp.openview.OvDiscoveryCore.OvDiscoveryInstanceXML]
SERVER_PORT = 6602
;SERVER_BIND_ADDR =
;CLIENT_PORT =
;CLIENT_BIND_ADDR =
[DEFAULT]
; EOF
PROXY
Usage: HTTP client (Reporter and/or OVPM)
Description: Sets the proxy for any OpenView HTTP clients running on
the system. Clients can be Reporter or OV Performance Manager. The
variables are comma-separated lists of hostnames, networks, and IP
addresses that apply to the proxy. Multiple proxies may be defined for
one PROXY key. A dash (-) before the list indicates that those entities do
not use this proxy, a plus (+) before the list indicates that those entities
do use this proxy. The first matching proxy is used.
Values: proxy:port +(a) – (b) ; proxy2:port2 + (c) – (d) ; …
Chapter 8 257
Communicating Across a Firewall
Introduction
CLIENT_BIND_ADDR(app_name)
Usage: HTTP client (Reporter and/or OVPM)
Description: Sets the IP address for the specified application’s
OpenView HTTP client. Valid application name is
com.hp.openview.CodaClient.
Values: <IP_address>
Default: not set
Example:
[com.hp.openview.CodaClient]
CLIENT_BIND_ADDR = 10.10.10.10
CLIENT_PORT(app_name)
Usage: HTTP client (Reporter and/or OVPM)
Description: Sets the port number or a range of ports for the specified
application’s OpenView HTTP client. Valid application name is
com.hp.openview.CodaClient.
Values: <port_range>
Default: not set
Example:
[com.hp.openview.CodaClient]
CLIENT_PORT = 14000-14003
258 Chapter 8
Communicating Across a Firewall
Introduction
SERVER_BIND_ADDR(app_name)
Usage: HTTP server (OVPA)
Description: Sets the IP address for the specified application’s OpenView
HTTP server. Valid application name is com.hp.openview.Coda.
Values: <IP_address>
Default: not set
Example:
[com.hp.openview.Coda]
SERVER_BIND_ADDR = 10.10.10.10
SERVER_PORT(app_name)
Usage: HTTP server (OVPA)
Description: Sets the port number or a range of ports for the specified
application’s OpenView HTTP server. Valid application name is
com.hp.openview.Coda.
Values: <port_number>
Default:
[com.hp.openview.bbc.LLBServer]
SERVER_PORT = 381
[com.hp.openview.bbc.LLBServer]
SERVER_PORT = 383
Example:
[com.hp.openview.Coda]
SERVER_PORT = 1100
Chapter 8 259
Communicating Across a Firewall
Introduction
260 Chapter 8
A Appendix
Chapter A 261
Appendix
Viewing MPE Log Files
262 Chapter A
Appendix
Viewing and Printing Documents
Chapter A 263
Appendix
Viewing and Printing Documents
264 Chapter A
Glossary
Glossary 265
Glossary
DSI
DSI log files Log files, created by the logappl The raw log file that contains
dsilog process, that contain self-describing summary measurements of the processes in
data collected outside of OV Performance each user-defined application.
Agent. See also dsilog.
logdev The raw log file that contains
empty space The difference between the measurements of individual device (such as
maximum size of a log file and its current disk) performance.
size.
logglob The raw log file that contains
extract An OV Performance Agent program measurements of the system-wide, or global,
that allows you to extract (copy) data from workload.
raw or previously extracted log files,
summarize it, and write it to extracted log logindx The raw log file that contains
files. It also lets you export data for use by additional information required for
analysis programs. accessing data in the other log files.
extracted log file An OV Performance logproc The raw log file that contains
Agent log file containing a user-defined measurements of selected interesting
subset of data extracted (copied) from a raw processes. See also interesting process.
or previously extracted log file. Extracted log
files are also used for archiving performance logtran The raw log file that contains
data. See also rxlog. measurements of transaction data.
global A qualifier that implies the whole ovpa script The OV Performance Agent
system. Thus, “global metrics” are metrics script that has options for starting, stopping
that describe the activities and states of each and restarting OV Performance Agent
system. Similarly, application metrics processes such as data collection, alarms,
describe application activity; process metrics and repository servers. See also the ovpa
describe process activity. man page.
266 Glossary
Glossary
transaction tracking
process Execution of a program file. It can roll back Deleting one or more days worth
represent an interactive user (processes of data from a log file, oldest data deleted
running at normal, nice, or real-time first. Roll backs are performed when a raw
priorities) or an operating system process. log file exceeds its maximum size parameter.
process log file See logproc. RUN file The file created by the scopeux
collector to indicate that the collection
process resource manager (PRM) process is running. Removing the RUN file
causes scopeux to terminate.
Stand-alone resource management tool
developed by Hewlett-Packard that is used
rxlog The default output file created when
to control the amount of resources that
data is extracted from raw log files.
processes use during a peak system load.
PRM can guarantee both a minimum and,
scopeux The OV Performance Agent
depending on the resource, a maximum
collector program that collects performance
amount of resources available to a group of
data and writes (logs) this raw measurement
processes.
data to raw log files for later analysis or
archiving.
PRM See process resource manager.
scopeux log files The six log files that are
raw log file A file containing summarized
created by the scopeux collector: logglob,
measurements of system data. The scopeux
logappl, logproc, logdev, logtran, and
data collector collects and logs data into raw
logindx.
log files. See also logglob, logappl, logproc,
logdev, logtran, and logindx.
status.scope The file created by the
scopeux collector to record status, data
real time The actual time in which an event
inconsistencies, or errors.
takes place.
transaction tracking The OV Performance
repeat time An action that can be specified
Agent capability that allows information
for performance alarms. Repeat time
technology (IT) resource managers to
designates the amount of time that must
measure end-to-end response time of
Glossary 267
Glossary
utility
268 Glossary
Index
1
Index
2
Index
extract, 164 filesystem command, extract program, 167
filesystem, 167 firewall
global, 168 client, 248
guide, 170 communicatiing across, 248
help, 171 communicating across, 248
list, 172 configure OVPA server port, 252
lvolume, 176 configure Reporter/OVPM with HTTP
menu, 177 proxy, 252
monthly, 179 configure Reporter/OVPM without HTTP
output, 182 proxy, 253
process, 185 default ports for communication with
quit, 187 OVPA, 250
report, 188 default.txt file printout, 254
sh, 189 default.txt location, 251
shift, 190 overview of OVPA communications
show, 192 configuration, 250
start, 194 server, 248
stop, 196 systems with multiple IP addresses, 254
weekdays, 199 format parameter
weekly, 200 export template file, 128
yearly, 203
extract program, 26, 112 G
command line arguments, 117 GlancePlus, 28
command line interface, 117 global command, extract program, 168
commands, 146 group parameter, parm file, 45
interactive versus batch, 114 guide command, extract program, 170
running, 114 guide command, utility program, 86
extracting log file data, 164 guided mode
extract, 170
F utility, 86
file parameter, parm file, 44
H
files
alarm definitions, 81, 208 headings parameter, export template file, 129
alarmdef, 81, 83, 208, 209, 246 help command, extract command, 171
datasources, 27, 209 help command, utility program, 87
default.txt, 251 HTTP
client, 249
default.txt configuration file, 251, 254, 257
export template, 125 clients, 249
proxies, 248
logappl, 33, 38
logdev, 33, 38, 39
logglob, 33, 37 I
logindx, 33 ID parameter
logproc, 33, 38 parm file, 37
logtran, 33, 39 IF statement, alarm syntax, 231
parm, 26, 36 INCLUDE statement, alarm syntax, 235
reptall, 125, 126 interactive mode
reptfile, 125, 188 extract program, 116
utility program, 61
repthist, 126
interesting processes, 38, 52
status.scope, 33
3
Index
items parameter, export template file, 131 missing parameter, export template file, 130
modifying
L collection parameters, 34
parm file, 34
layout parameter, export template file, 130
list command, extract program, 172 monthly command, extract program, 179
list command, utility program, 88 MPE log files, viewing, 262
local actions
alarms, 228 N
executing, 211 netif name record, 143
log file data nokilled option, 40
analyzing for alarm conditions, 212
archiving, 179, 200, 203 O
exporting, 161 OpenView Operations (OVO), 208, 210
extracting, 164 or parameter, parm file, 46
log files output command, extract program, 182
archiving data, 54 output parameter, export template file, 130
controlling disk space, 51 OV Network Node Manager, 208, 210
DSI, 26, 151, 164 OV Operations, 28
MPE, 262 OV Performance Agent
resizing, 95 components, 24
rolling back, 51, 53 data collection, 25
scanning, 101 description, 23
scopeux, 151 extract program, 26, 112
setting maximum size, 41, 52 utility program, 26, 58
log parameter, parm file, 37 OV Performance Manager, 23, 28
logappl file, 33, 38 OV Reporter, 28
PRM groups, 38 ovpa script, 49, 50
logdev file, 33, 38, 39 OVPM
logfile command, utility program, 90 configure with HTTP proxy for firewall
logglob file, 33, 37, 203 communication, 252
logical volume name record, 142 configure without HTTP proxy for firewall
logindx file, 33 communication, 253
logproc file, 33, 38
logtran file, 33, 39 P
LOOP statement, alarm syntax, 233
lvolume command, extract program, 176 parameter
subprocinterval, 41
M parameters, 36
CLIENT_BIND_ADDR(app_name), 258
maintenance time, parm file, 42 CLIENT_PORT(app_name), 258
mainttime parameter, parm file, 42, 51 PROXY, 257
managing data collection, 32
SERVER_BIND_ADDR(app_name), 259
memory option, 40
menu command SERVER_PORT(app_name), 259
extract program, 177 parm file, 26, 36
utility program, 92 application definition parameters, 42
messages in alarm syntax, 220 default values, 34
metric names in alarm syntax, 218, 240 modifying, 34
4
Index
parameters, 36, 37 reptall file, 125, 126
subprocinterval parameter, 41 reptfile file, 125, 188
syntax check, 93 repthist file, 126
parm file parameters resize command
application name, 43 default resizing parameters, 97
file, 44 reports, 98
group, 45 utility program, 61, 95
ID, 37 resizing
log, 37 log files, 95
mainttime, 42, 51 tasks, 53
or, 46 rolling back log files, 53
running
priority, 47 extract program, 114
scopeprocinterval, 41
utility program, 59
scopetransactions, 41
size, 41
threshold, 39 S
user, 45 scan command, utility program, 101
parmfile command, utility program, 93 scanning a log file, 101
perfalarm, 210, 236, 237 SCOPE default data source, 27, 218, 236, 237
performance alarms, 208 scopeprocinterval parameter, parm file, 41
perfstat command, 33 scopetransactions parameter, parm file, 41
PRINT statement, alarm syntax, 230 scopeux, 25, 33
printing documentation, 263 log files, 26, 151
priority parameter, parm file, 47 stopping, 49
PRM application logging mode, 42 sending alarm messages, 210, 226
PRM groups sending SNMP traps, 208, 210
APP_NAME_PRM_GROUPNAME, 38 separator parameter, export template file,
process command, extract program, 185 129
processing alarms, 209 server, firewall, 248
proxies, HTTP, 248 SERVER_BIND_ADDR(app_name)
PROXY parameter, 257 parameter, 259
SERVER_PORT(app_name) parameter, 259
Q setting maximum size of log files, 52
sh command
quit command extract program, 189
extract program, 187 utility program, 103
utility program, 94 shift command, extract program, 190
shortlived option, 41
R show command
raw log files extract program, 192
managing space, 95 utility program, 104
names, 90 size parameter, parm file, 41
record formats SNMP
ASCII, 134 nodes, 210
binary, 135 service, 209
datafile, 134 traps, 208, 210
report command, extract program, 188 start command
report parameter, export template file, 128 extract program, 194
Reporter parameters, 106
configure with HTTP proxy for firewall utility program, 106
communication, 252, 253 status.scope file, 33
5
Index
U V
USE statement, alarm syntax, 236 VAR statement, alarm syntax, 239
user parameter, parm file, 45 variables, alarm syntax, 239
utility commands viewing
analyze, 81, 212 documentation, 263
checkdef, 83 viewing MPE log files, 262
detail, 84
exit, 85 W
guide, 86
weekdays command, extract program, 199
help, 87 weekly command, extract program, 200
list, 88 WK1 format, export file, 129
logfile, 90
menu, 92 Y
parmfile, 93
quit, 94 yearly command, extract program, 203
resize, 61, 95
scan, 101
sh, 103
show, 104
start, 106
6
Index
7
Index