PERF(1)

NAME
perf - report kernel statistics

SYNOPSIS
perf [-a]
[-sampletime sec] [-drawline] [-nosmooth] [-drawone]
[-noreset] [-scrollback sampled-values] [-columns cols]
[-col1 color] [-col2 color] [-col3 color] [-col4 color]
[-foreground color] [-background color]
[-cpu] [-disk] [-page] [-swap] [-interrupts]
[-packets] [-errors] [-collisions] [-context] [-load]
[host]

DESCRIPTION
perf is an XView program that reports kernel statistics for a given host (or for the localhost if no host is specified). The program is a frontend to the rstatd(8) daemon.

The displayed window consists of one or more fields, each showing a specified parameter. The name of the parameter and of its components are shown in the lower left corner of the field, the maximum value of the visible data in the lower right corner.

OPTIONS

-sampletime sec
    Query the rstatd each sec seconds for new data. Default is 2.

-drawline
    Draw only a line instead of a filled block.

-nosmooth
    If the drawing is filled, do not smooth the data.

-drawone
    Show only the sum of multiple subvalues like e.g. usr, nice & sys. This is the default on monochrome diplays.

-noreset
    Do not readjust the maximum value shown in the lower right corner.

-scrollback sampled-values
    Set the scrollback buffer to sampled-values. Default is 200, i.e. 20 minutes if sampletime is 2. The total number of samples stored is field_width_in_pixels + scrollback.

-columns cols
    Display the fields in cols columns. Default is 1.

-col[1-4] color -forground color -background color
    The first subvalue is drawn with the color col1, the second with col2 and so on. color must be of the form #rrggbb, where rr is the red component, gg the green and bb the blue one (e.g #ff0000 is red). Defaults:
    col1: #000000 (black)
    col2: #a0a0a0
    col3: #c0c0c0
    col3: #e0e0e0
    col4: #ffffff (white)
    foreground is black and background is white.

The following options specify, which statistic values are displayed:

-cpu
    Percent of cpu being used.

-disk
    Disk transfers per second.

-page
    Pages paged per second.

-swap
    Pages swapped per second.

-interrupts
    Number of device interrupts in a second.

-packets
    Network packets per second.

-errors
    Errors per second on receiving packets.

-collisions
    Collisions per second detected on the network.

-context
    Number of context switches per second.

-load
    Load average.

-a  All of the above 10 options.

KEYBOARD ACCELERATORS

q   Quit the program.

s   Toggle solid drawing.

o   Toggle smooth option.

1   Toggle the drawone option.

?   Bring up the properties window.

NL (NewLine)
    Restore all scrollback windows to the current values.

Mouse (Pointer device) Usage

Right Mouse Button
    You can bring up the properties window by clicking the right mouse button. Don't forget to select the 'Apply' button after changing values.
    If you click the right mouse button over one of the displayed fields while pressing the SHIFT key, you can change values valid only for this field. You can reset this settings by selecting the 'No special flags' button.

Left Mouse Button
    If you click in a field with the left mouse button, the exact value of the sample will be displayed in the properties window. If you drag the field, you can examine the sampled values in the scrollback history.

Middle Mouse Button
    You can scroll more than one field at once by selecting all of them first with the middle mouse button.

X RESOURCES

Following X Resources are examined during startup:
    perf.sampletime
    perf.drawline
    perf.nosmooth
    perf.drawone
    perf.noreset
    perf.scrollback
    perf.columns
    perf.col1
    perf.col2
    perf.col3
    perf.col4
    perf.foreground
    perf.background

Note: Options take precedence over X Resources.

FEATURES/BUGS

The maximum scrollback is limited to 20000 values. This is because by initiating a scrollback the whole history will be drawn on a single pixmap and this can be a memory hog. Besides X limits the size of a pixmap to 2^15 pixels (if I'm right).