Table of Contents

Name

xperfmon++ - X Window System-based performance monitor

Synopsis

xperfmon++ [-toolkitoption ...] [-additionaloption ...]

Description

xperfmon++ continuously displays multiple system statistics as a set of parallel line graphs. The name of the host is displayed in the upper left hand corner. Immediately under the hostname, the update interval is displayed. The information is scaled so that it always fills the window regardless of geometry changes.

The xperfmon++ application is based on highly modified Athena StripChart Widgets. (The original xerfmon used a custom private Widget.) All scrolling action is smooth, i.e., one pixel at a time, and the scale labels are updated immediately on plotting a new point outside a previous scale range. The program can produce a filled graph or a line graph and the update interval can be set in seconds or 100-millisecond intervals.

While xperfmon++ is running, it is possible to perform certain tasks by pressing keys over the window:


Q/q: Quit... Exit gracefully
l | L: Print out a chart of all current limit settings. This chart will appear in the window from which xperfmon++ was invoked.
s: Decrease update interval (slower) by a small amount
S: Decrease update interval (slower) by a large amount
f: Increase update interval (faster) by a small amount
F: Increase update interval (faster) by a large amount
?: Help

Options

xperfmon++ accepts all of the standard X Toolkit command line options along with the following additional options:

-interval seconds
This options specifies the update interval for the graph. The default is 1. The interpretation of this option is modified by the fast option.

-fast
This option modifies the meaning of the update option. When -fast is specified, the update interval is modified to specify milliseconds. Otherwise, the update interval specifies seconds. When running in fast mode, the minimum update interval is 100 milliseconds.

-fill
This option controls the type of graph produced. When -fill is specified the program produces a filled graph, otherwise a line graph is generated.

-immediate
This option controls what the {high|low} limit {alarms|warnings} are based on. When set, the limit {alarms|warnings} are based on the current data sample only. When not set, (the default) the limits are based on the {min|max} value present in the viewable graph.

Graphing Options

The following options specify the list of statistics to be displayed. If none are present on the command line, then all statistics are displayed. If any "+" options are listed the default list is cleared and only those listed as "+" options are displayed. If any "-" options are listed, then they are taken away from the default list. Specifying both "-" and "+" options will produce unpredictable results.

-sysload | +sysload
Graph percentage of System Load (avaraged over 1 minute).
-usercpu | +usercpu
Graph percentage of User CPU Time.
-nicecpu | +nicecpu
Graph percentage of Nice CPU Time.
-systemcpu | +systemcpu
Graph percentage of System CPU Time.
-intercpu | +intercpu
Graph percentage of Interrupt CPU Time.
-idlecpu | +idlecpu
Graph percentage of Idle CPU Time.
-free{mem/swap} | +free{mem/swap}
Graph Free Memory/Swap (Operating system dependent, swap for FreeBSD in %).
-diskxfr | +diskxfr
Graph Disk Transfers per interval period.
-interrputs | +interrupts
Graph System Interrupts.
-inputpkts | +inputpkts
Graph number of network Input Packets.
-outputpkts | +outputpkts
Graph number of network Output packets.
-collpkts | +collpkts
Graph number of network Collision Packets.
-nfsclient | +nfsclient
Graph Number of NFS Client transactions.
-nfsserver | +nfsserver
Graph number of NFS Server transactions.

Limit Options

xperfmon++ will accept a number of limit options. When a data point exceeds a high or low limit the background of that graph changes color to visually reflect the condition. The background color is an indication of the min (low limit) or max (high limit) value currently contained in the graph. When no limit has been exceeded the background color is set to green. If no limits have been set for that graph its background color remains the same as the applications default color, which is usually white.

WARNING: High and Low limits are mutually exclusive, i.e., you can set high limits or low limits, but not both. If both are inadvertently set, the high limits are checked first, and the low limit will be ignored.

There are four possible limit conditions:

High Warning
When any value in the current graph exceeds the high warning limit the background color of that graph is changed to yellow.
Low Warning
When any value in the current graph is less than the low warning limit the background color of that graph is changed to yellow.
High Alarm
When any value in the current graph exceeds the high alarm limit the background color of that graph is changed to red.
Low Alarm
When any value in the current graph is less that the low alarm limit the background color of that graph is changed to red.

Limits can be set with command line options or with application resources. The syntax of setting a limit option from the command line is (Note: Case IS sensitive):

-low*Alarm value
Set low Alarm value for *.
-low*Warn value
Set low Warning value for *.
-high*Alarm value
Set high Alarm value for *.
-high*Warn value
Set high Warning value for *.

Where "*" is one of the following:

load
Set limit value for Load Average (multiplied by 100!!!).
user
Set limit value for User CPU Percentage.
nice
Set limit value for Nice CPU Percentage.
sys
Set limit value for System CPU Percentage.
inter
Set limit value for Interrupt CPU Percentage.
idle
Set limit value for Idle CPU Percentage.
mem/swap
Set limit value for Free Memory/Swap (OS dependent, swap for FreeBSD).
disk
Set limit value for Disk Transfers.
intrpts
Set limit value for System Interrupts.
input
Set limit value for network Input Packets.
output
Set limit value for network Output Packets.
collision
Set limit value for network Collision Packets.
nfsclient
Set limit value for NFS Client Transactions.
nfsserver
Set limit value for NFS Server Transactions.

For example:

-lowuserA 25
Set low user Alarm value to 25.

As with any X-based command line specification you only need specify the minimum number of characters required to make the string unique. See below for a description of setting limit values using application resource specifications.

Toolkit Options

The following standard X Toolkit arguments are commonly used with xperfmon++:

-d | -display display
This option specifies the X server to contact.

-g | -geometry geometry
The xperfmon++ window is created with the specified size and location determined by the supplied geometry specification. See X(1) for a full explanation.

-bd | -bordercolor color
This option specifies the border color. The default is black.

-bg | -background color
This option specifies the background color. The default is white.

-bw | -borderwidth pixels
This option specifies the width in pixels of the border around the window. The default value is 2.

-fg | -foreground color
This option specifies the foreground color. The default color is black.

-fn | -font fontname
This options specifies the font to be used in displaying the hostname and labels. The default is 6X10.

-xrm resourcestring
This option specifies a resource string to be used. This is especially useful for setting resources that do not have separate command line options.

X Defaults

xperfmon++ understands all of the core resource names and classes as well as:

width (class Width)
Specifies the width of the load average graph.
height (class Height)
Specifies the height of the load average graph.
update (class Interval)
Specifies the frequency in seconds at which the performance statistics should be redisplayed.
foreground (class Foreground)
Specifies the color for the foreground. The default is black since the core default for background is white.
font (class Font)
Specifies the font to be used for the label. The default is fixed.
reverseVideo (class ReverseVideo)
Specifies that the foreground and background should be reversed.

Limit Resources

To set a limit that applies to all active graphs use the class name as in the following syntax:
*PerfChart.{lowAlarm|lowWarn|highAlarm|highWarn}
Individual graph limit alarm and warning values can be set with resource specifications.

To set a limit that applies to any individual graph use the following syntax:

*perfChart&.lowAlarm:
value
*perfChart&.lowWarn:
value
*perfChart&.highAlarm:
value
*perfChart&.highWarn:
value

Where "&" is one of the following (Note: Case IS important):

Load
Set System Load resource.
User
Set User CPU Percentage resource.
Nice
Set Nice CPU Percentage resource.
System
Set System CPU Percentage resource.
Inter
Set Interrupt CPU Percentage resource.
Idle
Set Idle CPU Percentage resource.
Free/Swap
Set Free Memory/Swap resource.
Disk
Set Disk Transfer count resource.
Intrpts
Set System Interrupts resource.
Input
Set network Input Packets resource.
Output
Set network Output Packets resource.
Collision
Set network Collision Packets resource.
NFSClient
Set NFS Client Transactions resource.
NFSServer
Set NFS Server Transactions resource.

For example:

*perfChartIdle.lowAlarm: 25
Set low Idle Alarm (Idle CPU Percentage) value to 25.

There is a sample Application Defaults file included in the distribution called XPerfmon++.ad. Copy this file to your private directory and edit it to your hearts content. Then load it into xrbd with a command like:

xrdb -m XPerfmon++.ad

Environment Variables

DISPLAY - specifies the default host and display number.

See Also

X(1) , uwm(1) , xload(1) , mem(4)

Bugs

xperfmon++ requires the ability to open and read the special system file /dev/kmem. On most systems, this requires the suid (set user id) bit to be set with root ownership, or the sgid (set group id) bit to be set and membership in the same group as /dev/kmem.

Reading /dev/kmem is inherently non-portable. Therefore, the widget upon which this application is based must be ported to each new operating system.

There is a known bug in the refresh logic that occassionally occurs when a partially occluded xperfmon++ window is partially or fully exposed. This is manifested in the redraw logic overwriting some or all of one or more graphs, and/or the timestamps. It can be corrected by fully covering the xperfmon++ window and then exposing it, or by iconifying the xperfmon++ window and then de-iconifying it.

Authors

The X11 version of xperfmon was written by Emanuel Jay Berkenbilt, Project Athena on 1/21/1988. There is no record of previous authors.

xperfmon was modified by Thomas Bagli, PCS Computer Systeme GmbH, West Germany, to be a toolkit-based client.

xperfmon++ was created from xperfmon, and the Athena StripChart Widget, by Roger Smith, Sterling Software @ NASA-Ames Research Center, Moffett Field, California. Version 1.0 was released in January, 1994.

If you like this program, or if you have difficulties, I would like to hear your comments. E-Mail me at rsmith@proteus.arc.nasa.gov.

xperfmon++ was written for Suns running SunOs and X11R5 Windows software. If some energetic soul out there would like to port this program to any other operating system or architecture I would be glad to incorporate the modifications into this master copy. Send me your changes via E-Mail at the above address.

xperfmon++ V1.2 for FreeBSD was written by Lars Köller with a lot of helpful notes by Jörg Wunsch.

xperfmon++ V1.31 for FreeBSD close some memory leaks, fix geometry (resize) bug, display free swap without resizing of graph in percent.

xperfmon++ V1.33 for FreeBSD contains some fixes due to event problems and compiles fine under FreeBSD 2.2 (changes in get_swapspace). Now the -geometry switch works well!

xperfmon++ V1.40 for FreeBSD contains some fixes due to changes in the networking structs and cleans up the FreeBSD version number #if's. Now it should compile fine from FreeBSD 2.0 up to FreeBSD-3.0-current.

xperfmon++ V2.0 for FreeBSD 2.2.X and 3.0 added System Load, Nice and Interrupt CPU graphs. Should compile fine from FreeBSD 2.2 up to FreeBSD-3.0-current.

Please E-Mail any bugs or comments with the subject "xperfmon++: ..." to Lars.Koeller@Uni-Bielefeld.DE.

Enjoy!


Table of Contents