prmanalyze(1)prmanalyze(1)NAMEprmanalyze - examine HP-UX account history for PRM configuration plan‐
ning
SYNOPSIS
configfile] resource_density] minimum_duration]
exclude_key_value] [filename ...]
DESCRIPTION
You can only use if you have collected HP-UX accounting data in a file
(default /var/adm/pacct) using acctfilename.
scans the accounting files for information on the desired resource type
(disk, memory, or CPU) and orders the records by the requested sort key
(user, HP-UX group, command name, or PRMID).
Use this utility when creating an initial PRM configuration and when
fine-tuning existing PRM configurations.
If you would like to obtain information for billing based on PRM
groups, use /usr/sbin/acct/acctcom -P.
NOTE
Average, peak, and percent values for KB should be comparable to those
presented by However, the memory totals (in KB minutes) for may differ.
This is due to the fact that HP-UX accounting charges memory usage only
when a process is actually running, and charges no memory whatsoever
when the process does not have CPU resources. This leads to artifi‐
cially low numbers for PRM purposes. For the sake of resource manage‐
ment, assumes that for the whole wallclock existence of a process, the
job holds its resident memory pages reserved, whether it uses them or
not. Part of the task of is to prevent paging in well-behaved groups by
isolating and eliminating sources of conflict. This may lead to total
values that are somewhat higher than values from other tools; there‐
fore, be cautious when billing based on memory totals.
COMMAND AVAILABILITY
Any user can run the command assuming the user has read permissions on
filename.
OPTIONS
Running without options is equivalent to the command line:
Display version information and exit.
Specify how to sort the accounting data.
Only one type of sort is permitted at a time. The data can be
sorted by:
(default)
Each sort type can be abbreviated using its first letter.
Seeing the data displayed in different ways can help you decide
which users or applications to put into which PRM groups. Pat‐
terns of extreme usage or starvation may indicate the need for a
particular type of PRM enforcement. Use of the type will auto‐
matically make recommendations for both user and application
records based on the history of your system. Examination of
results by PRMID can help to evaluate the effectiveness of a
particular strategy once it has been implemented.
Tell the analysis not to take the PRMID from the accounting file, but
to
compute it using the rules in the specified configuration file.
This is handy for "what-if" scenarios to show how usage and con‐
flict patterns might have changed under a new or proposed con‐
figuration. This option only works with the sort key.
Specify the resource to analyze.
Only one resource can be analyzed at a time. The resources are:
(default)
Each resource type can be abbreviated using its first letter.
Resource usage is presented in bytes per second for disk, KB for
memory, and seconds for CPU.
All reports contain some reference to total, average, and peak
values for particular resource consumption.
Note that if a process does not use any measurable amount of a
given resource, it is filtered out of the data. Thus, different
resource reports may have slightly different record totals.
Specify the report type. Valid report types are:
(default)
Provide a high-level view of resource use, giving statis‐
tics for the entire data set. The percentages found in this
report generally make a good starting point for creating a
new PRM configuration.
Provide the finest granularity (down to one minute) and is
good for fine-tuning a PRM configuration.
This report requires a resource_density that is set using
the option or defaults to a value specified in the descrip‐
tion.
Whenever resource use exceeds the resource_density, a con‐
flict occurs. Each conflict is reported separately, with
the start time, stop time, peak consumption, and a list of
the processes (grouped by sort key) that contributed to the
conflict.
This report detects problems that daily or hourly reporting
may be too coarse to reveal. Be aware that this report uses
averages and assumes that resource consumption rates remain
relatively constant over the life of the process.
Divide the accounting files into one-hour chunks. This
report can help you spot common time-based usage patterns
where you might use PRM to prevent contention. For example,
nightly backups can cause a surge in disk demand in the
middle of the night. Mail programs can typically cause
spikes in several system resources for an hour after people
arrive in the morning and an hour after lunch. Partial
hours at the end of data are not reported.
These reports provide higher-level views of the same data
given in the hourly report. These reports give a good indi‐
cation of overall trends and usage patterns for a system
over a prolonged period.
The weekly and monthly reports are most commonly used for
resource planning and billing purposes.
All the report types except write to an intermediate file on the
first pass, sort by program start time, and then make a second
pass on the chronologically ordered resource events.
Each report type can be abbreviated using its first letter.
Request that available accounting information for all currently running
processes be added to the report.
This option allows you to get data on server applications that
run indefinitely and consequently are not tracked in the
accounting files.
Remove all values that are less than 1% of the total.
This option can be used with any report, but is most often used
when generating a summary report (-t summary). This option is
most useful when sorting by command or when determining the big‐
gest resource consumers.
It also makes the report shorter and easier to read.
Note that when is used, the values in the column may not sum to
100%.
Generate reports using the exponential format (n.nnnE+pp, which equates
to
n.nnn times 10 to the p power).
This option is most useful when generating a monthly report
(-t monthly) for disk or memory, and the total values or peak
values are in the terabyte range.
Specify the floating-point
resource_density threshold for a report.
Use this option with the conflict report or one of the time-
based reports (hourly, daily, ...). When used with the time-
based reports, this option filters out time intervals with
resource usage less than resource_density.
Only one threshold is permitted.
Express the resource_density values in the units indicated
below.
KB/second
(default: 4096 KB/second)
KB
(default: half the memory available for nonroot users)
CPU_time/wallclock_time
(default: half the number of cores on the machine)
Consider the CPU density as the effective number of cores
in use, where a core is the actual data-processing engine
within a processor. A core might support multiple execution
threads, as explained in the section HYPER-THREADING in the
prm(1) manpage. (The CPU_time value is the amount of CPU
time granted to all active processes during a time inter‐
val. The wallclock_time value is the amount of time that
elapses on a wallclock during the interval.)
When this option is not specified, uses the default density for
the resource being analyzed.
Specify a minimum job duration (in seconds of wall clock time, not CPU)
for inclusion in reports.
The majority of interactive UNIX jobs (such as ps and ls) will
complete in under a second. This feature may be used to filter
out transient noise from interactive users and concentrate on
longer running applications important enough to have their own
application records.
Specify a value to exclude from all reports.
Using this option removes any line in which the
exclude_key_value is an exact match of the string in the first
column ( column) of the reports.
Note that error checking is done on this string when the tool
needs to convert strings to internal numerical representations
such as PRMIDs or user IDs.
This option can be repeated. Use it to filter out known or unin‐
teresting data points. This option cannot be used with the
option.
filename
Accounting file. Separate multiple files with spaces. If no file
names are given, the default /var/adm/pacct is used.
You can use regular expressions in file names.
These files can be listed in any order.
The total number of records from all the specified accounting
files appears at the beginning of each report. There is one
record for every process that exited the system while (1M) was
routing data to the specified files.
RETURN VALUE
returns exit status based on the phase of failure.
No errors.
Errors in the command-line arguments.
Internal run-time errors in the program before it could
generate a summary report. Generally, these errors involve space
allocation.
Internal run-time errors during the specialized report generation.
These errors usually involve data corruption in an intermediate
file.
EXAMPLES
Example output depicted below is for the purposes of illustration and
format only. It is not from an actual machine.
This command requests a CPU summary of all commands, ignoring those
with the default name of a.out, and those under 1% of overall usage.
summary CPU report by command name : 287869 records processed
unique id processes ave secs peak secs total secs % total
adb 174 1511.05 19840.23 262922.70 19.00
f77pass1 4680 84.17 5369.41 393915.60 28.47
f90com32 8430 75.73 1049.98 638403.90 46.15
xterm 559 62.22 30018.56 34780.98 2.51
This command requests a memory conflict report, filtering out root pro‐
cesses and usage under 10MB.
conflict memory report by user id begins at Thu Nov 5 13:48:00 1998
ave KB mem threshold 10240.00
unique id ave KB peak KB KB minutes % total
Nov 16 14:27 -
Nov 16 14:34 69182.85 76794.65 484279.98
doc 4617.68 4617.68 32323.75 6.67
dopey 152.97 152.97 1070.77 0.22
greedy 62621.07 70232.86 438347.50 90.52
grumpy 659.03 659.03 4613.23 0.95
happy 501.06 501.06 3507.43 0.72
sneezy 631.04 631.04 4417.30 0.91
Or using abbreviations:
This command requests an hourly disk report by command name, filtering
out every hour averaging under 4KB per second. Note that hours below
the defined threshold print only a total and no details. This report
demonstrates different kinds of disk activity bursts throughout the
day.
hourly disk report by command name begins at Mon Nov 16 13:00:00 1998
ave Bps disk threshold 4096.00
unique id ave Bps peak Bps total KB % total
Nov 16 13:00 8250.97 42414.69 483.46
CC 410.74 2895.84 24.07 4.98
c++ptcom 233.53 1877.33 13.68 2.83
c++ptlin 3036.73 27153.07 177.93 36.80
cfront 667.59 5304.25 39.12 8.09
cpp.ansi 2297.46 19865.60 134.62 27.84
ld 310.33 4881.07 18.18 3.76
nm 837.97 14984.53 49.10 10.16
sort 168.11 1399.47 9.85 2.04
tcsh-6.0 4.85 4.85 0.28 0.06
telnetd 0.58 0.58 0.03 0.01
vi 28.44 392.53 1.67 0.34
Nov 16 14:00 304.67 1816.01 17.85
Nov 16 15:00 367.98 9112.17 21.56
Nov 16 20:00 93.42 109.64 5.47
Nov 16 23:00 311922.89 1016694.74 18276.73
cp 0.28 17.07 0.02 0.00
dump 311812.83 1016583.91 18270.28 99.96
java 1.19 2.16 0.07 0.00
This command gives a grand total of CPU usage by PRM group, excluding
the special reserved group PRM_SYS and contributors under 1% of the
total.
summary CPU report by PRM id : 287869 records processed
unique id processes ave secs peak secs total secs % total
1 55727 3.76 13236.48 209455.83 26.50
2 148295 3.24 408.09 480127.52 60.75
3 5151 16.31 1514.64 84019.34 10.63
More examples are available in the HP Process Resource Manager User's
Guide.
AUTHOR
was developed by HP.
FILES
default (1M) accounting file.
SEE ALSOprm(1), prmagt(1), prmavail(1), prmconfig(1), prmlist(1), prmload‐
conf(1), prmmonitor(1), prmmove(1), prmrecover(1), prmrun(1), acc‐
ton(1M), acctcom(1M), prmconf(4).
HP Process Resource Manager User's Guide (/opt/prm/doc/PRM.ug.pdf)
HP Process Resource Manager homepage (http://www.hp.com/go/prm)
prmanalyze(1)