---
name: "xmeter"
section: "1x"
platform: "linux"
package: "xmeter"
version: "1.15-6.1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/xmeter"
---

# xmeter(1x)

rstat display for X

## NAME

xmeter - rstat display for X

## SYNOPSIS

**xmeter** \[-*toolkitoption* ...\] \[-*option* ...\] \[-*stat*\] hosts ...

## DESCRIPTION

*Xmeter* displays a periodically updating histogram of the system statistics gathered by rstat(3) for the specified hosts.  Meters can be displayed in a vertical, horizontal or rectangular arrangement.  As statistics range between 4 user defineable levels (OK, WARN, ERROR or FATAL), the background, foreground, highlight, border and internal border colors, and the background bitmap of each meter can be changed.

*Xmeter* uses the StripChart widget of the Athena Widget Set to graph each statistic.  StripCharts automatically scale the graph as the value varies, by drawing a number of horizontal lines across the StripChart. Each line represents an increment of a user settable value.  For example, if the statistic being graphed is number of pages paged in per second, and the scale is set to 10, then each horizontal line would represent 10 pages per second.  Each time a graph is updated, *xmeter* will examine the current value of the statistic and the current scale. As the number of scale lines increases above *wlevel* and *elevel* the background colors and bitmaps of each meter are modified as specified. The current scale value can be examined by clicking any mouse button while the mouse pointer is in the StripChart.  If the host is down the time it's been down will also be displayed.

Each meter has its own label displaying the host name and statistics name. The statistic being graphed may be modified while *xmeter* is running by moving the mouse pointer into the label part of a meter, clicking any mouse button, and sliding down to the desired stat.  This menu also contains a quit option to exit *xmeter.*

## OPTIONS

*Xmeter* accepts all of the standard X Toolkit command line options along with the  following additional options:

- **-cols *cols***

  This option specifies the number of columns the meters should be displayed in.  If both *cols* and *rows* are specified, *cols* takes precedence.  The default is 1 column.

- **-dv**

  If specified causes the current value, after scaling, to be displayed in the label.  The current scale value can be displayed by clicking any mouse button in the StripChart.

- **-ebd *color***

  Set error level border color.

- **-ebg *color***

  Set error level background color.

- **-efg *color***

  Set error level foreground color.

- **-ehl *color***

  Set error level highlight color.

- **-eibd *color***

  Set error level internal border color.

- **-elevel *integer***

  This option specifies the level at which the background color is changed to ebg.  The default is 6.

- **-ep *program***

  *program* should be the name of a program to be invoked when the meter enters the error state. *program* will be passed 4 arguments, oldstate, newstate, hostname and stat being monitored.  Oldstate and newstate will be integers ranging from 0 to 3, corresponding to levels OK, WARN, ERROR and FATAL.

- **-fbd *color***

  Set fatal level border color.

- **-fbg *color***

  Set fatal level background color.

- **-ffg *color***

  Set fatal level foreground color.

- **-fhl *color***

  Set fatal level highlight color.

- **-fibd *color***

  Set fatal level internal border color.

- **-fp *program***

  *program* should be the name of a program to be invoked when the monitored host is down. *program* will be passed 4 arguments, oldstate, newstate, hostname and stat being monitored.  Oldstate and newstate will be integers ranging from 0 to 3, corresponding to levels OK, WARN, ERROR and FATAL.

- **-h *pixels***

  This option specifies the height of each chart *xmeter* will display.  The default is 80.

- **-lebg *color***

  Set error level background color in menubutton.

- **-lefg *color***

  Set error level foreground color in menubutton.

- **-lfbg *color***

  Set fatal level background color in menubutton.

- **-lffg *color***

  Set fatal level foreground color in menubutton.

- **-lobg *color***

  Set ok level background color in menubutton.

- **-lofg *color***

  Set ok level foreground color in menubutton.

- **-lwbg *color***

  Set warn level background color in menubutton.

- **-lwfg *color***

  Set warn level foreground color in menubutton.

- **-obd *color***

  Set ok level border color.

- **-obg *color***

  Set ok level background color.

- **-ofg *color***

  Set ok level foreground color.

- **-ohl *color***

  Set ok level highlight color.

- **-oibd *color***

  Set ok level internal border color.

- **-op *program***

  *program* should be the name of a program to be invoked when the meter enters WARN state. *program* will be passed 4 arguments, oldstate, newstate, hostname and stat being monitored.  Oldstate and newstate will be integers ranging from 0 to 3, corresponding to levels OK, WARN, ERROR and FATAL.

- **-rows *rows***

  This option specifies the number of rows the meters should be displayed in.  If both *cols* and *rows* are specified, *cols* takes precedence.  The default is 1 column.

- **-rt *retries***

  This option specifies the number of times to retry failed RPC calls. The default is 2.

- **-scoll *integer***

  Set scale for collisions.  The default is 1.

- **-scpu *integer***

  Set scale for cpu time.  The default is 20.

- **-sdisks *integer***

  Set scale for total number of disk I/O.  The default is 40.

- **-serr *integer***

  Set scale for total number of errors (ierr+oerr).  The default is 1.

- **-sierr *integer***

  Set scale for input errors.  The default is 1.

- **-sintr *integer***

  Set scale for interrupts.  The default is 50.

- **-sipkt *integer***

  Set scale for input packets.  The default is 20.

- **-sload *integer***

  Set scale for load average.  The default is FSCALE (see param.h).

- **-sn**

  If specified strips off domain part of host name in menubuttons.

- **-soerr *integer***

  Set scale for output errors.  The default is 1.

- **-sopkt *integer***

  Set scale for output packets.  The default is 20.

- **-spage *integer***

  Set scale for pages paged in and out.  The default is 10.

- **-spgpgin *integer***

  Set scale for pages paged in.  The default is 10.

- **-spgpgout *integer***

  Set scale for pages paged out.  The default is 10.

- **-spkts *integer***

  Set scale for total number of packets (ipkt+opkt).  The default is 40.

- **-spswpin *integer***

  Set scale for pages swapped in.  The default is 5.

- **-spswpout *integer***

  Set scale for pages swapped out.  The default is 5.

- **-sswap *integer***

  Set scale for pages swapped in and out.  The default is 5.

- **-sswt *integer***

  Set scale for context switches.  The default is 30.

- **-ssys *integer***

  Set scale for sys time.  The default is 20.

- **-suser *integer***

  Set scale for user time.  The default is 20.

- **-to *seconds***

  This option specifies the timeout for RPC calls.  The default is 5 seconds.

- **-update *seconds***

  This option specifies the frequency in seconds at which *xmeter* updates its display.  The minimum amount of time allowed between updates is 5 seconds.  The default is 60 seconds.

- **-v**

  Print version number and exit.

- **-w *pixels***

  This option specifies the width of each chart *xmeter* will display.  The default is 80.

- **-wbd *color***

  Set warn level border color.

- **-wbg *color***

  Set warn level background color.

- **-wfg *color***

  Set warn level foreground color.

- **-whl *color***

  Set warn level highlight color.

- **-wibd *color***

  Set warn level internal border color.

- **-wlevel *integer***

  This option specifies the level at which the background color is changed to wbg.  The default is 3.

- **-wp *program***

  *program* should be the name of a program to be invoked when the meter enters WARN state. *program* will be passed 4 arguments, oldstate, newstate, hostname and stat being monitored.  Oldstate and newstate will be integers ranging from 0 to 3, corresponding to levels OK, WARN, ERROR and FATAL.

## STATISTICS

- **-coll**

  Graph number of collisions per second.

- **-cpu**

  Graph percentage of non idle time for the specified host.

- **-disks**

  Graph number of disk I/O per second (first four drives).

- **-err**

  Graph number of total errors per second.

- **-intr**

  Graph number of interrupts per second.

- **-ipkt**

  Graph number of input packets per second.

- **-load**

  Graph 1 minute load average.

- **-oerr**

  Graph number of output errors per second.

- **-opkt**

  Graph number of output packets per second.

- **-page**

  Sum of pgpgin and pgpgout values.

- **-pgpgin**

  Graph number of pages paged in per second.

- **-pgpgout**

  Graph number of pages paged out per second.

- **-pkts**

  Graph number of total packets per second.

- **-pswpin**

  Graph number of swapins per second.

- **-pswpout**

  Graph number of swapouts per second.

- **-swap**

  Graph number of total pages swapped per second.

- **-swt**

  Graph number of context switches per second.

- **-sys**

  Graph percentage of system time for the specified host.

- **-user**

  Graph percentage of user time for the specified host.

## WIDGET HIERARCHY

The widget hierarchy for *xmeter* is given below.  Class names are given first, followed by instance names.

```
XMeter xmeter
	Form form
		SimpleMenu statmenu
			SmeBSB <stat>
		Paned <hostname>
			MenuButton menu
			StripChart load
```

## RESOURCES

The following resources are defined.  Resource instance names are specified first, followed by class name.

- **columns Columns**

  Set number of columns of display.

- **displayvalue DisplayValues**

  Display current value in label.

- **defStat DefStat**

  Default statistic to graph, the default is **load**.

- **errorBack Background**

  Error level background color.

- **errorBd Foreground**

  Error level border color.

- **errorBitmap Bitmap**

  Error level background bitmap.

- **errorFore Foreground**

  Error level foreground color.

- **errorHl Foreground**

  Error level highlight color.

- **errorIbd Foreground**

  Error level internal border color.

- **errorLevel ErrorLevel**

  When a statistic is above this value colors and bitmaps are set to the appropriate error level value.

- **errorProg Program**

  Program to be invoked when a meter enters error state.

- **fatalBack Background**

  Background color of dead hosts.

- **fatalBd Foreground**

  Border color of dead hosts.

- **fatalBitmap Bitmap**

  Background bitmap of dead hosts.

- **fatalFore Foreground**

  Foreground color of dead hosts.

- **fatalHl Foreground**

  Highlight color of dead hosts.

- **fatalIbd Foreground**

  Internal border color of dead hosts.

- **fatalProg Program**

  Program to be invoked when a meter enters fatal state.

- **lErrorBack Background**

  Error level background color of menubutton widget.

- **lErrorFore Foreground**

  Error level foreground color of menubutton widget.

- **lFatalBack Background**

  Fatal level background color of menubutton widget.

- **lFatalFore Foreground**

  Fatal level foreground color of menubutton widget.

- **lOkBack Background**

  Ok level background color of menubutton widget.

- **lOkFore Foreground**

  Ok level foreground color of menubutton widget.

- **lWarnBack Background**

  Warn level background color of menubutton widget.

- **lWarnFore Foreground**

  Warn level foreground color of menubutton widget.

- **okBack Background**

  Ok level background color.

- **okBd Foreground**

  Ok level border color.

- **okBitmap Bitmap**

  Ok level background bitmap.

- **okFore Foreground**

  Ok level foreground color.

- **okHl Foreground**

  Ok level highlight color.

- **okIbd Foreground**

  Ok level internal border color.

- **okProg Program**

  Program to be invoked when a meter enters ok state.

- **retries Retries**

  Number of retries for RPC calls.

- **rows Rows**

  Number of rows to display.

- **scaleColl ScaleColl**

  Scale for interface collisions.

- **scaleCpu ScaleCpu**

  Scale for percentage cpu usage.

- **scaleIerr ScaleIerr**

  Scale for interface input errors.

- **scaleIerr ScaleIntr**

  Scale for interface interrupts.

- **scaleIpkt ScaleIpkt**

  Scale for interface input packets.

- **scaleLoad ScaleLoad**

  Scale for load average.

- **scaleOerr ScaleOerr**

  Scale for interface output errors.

- **scaleOpkt ScaleOpkt**

  Scale for interface output packets.

- **scalePage ScalePage**

  Scale for paging (sum of pageins and pageouts).

- **scalePgpgin ScalePgpgin**

  Scale for pages paged in.

- **scalePgpgout ScalePgpgout**

  Scale for pages paged out.

- **scalePswpin ScalePswpin**

  Scale for swap ins.

- **scalePswpout ScalePswpout**

  Scale for swap outs.

- **scaleSwt ScaleSwt**

  Scale for context switches.

- **scaleSys ScaleSys**

  Scale for percentage system time.

- **scaleUser ScaleUser**

  Scale for percentage user time.

- **shortName ShortName**

  Trim domains off host names.

- **timeout Timeout**

  Timeout for RPC calls.

- **update Interval**

  Interval between updates.

- **warnBack Background**

  Warn level background color.

- **warnBd Foreground**

  Warn level border color.

- **warnBitmap Bitmap**

  Warn level Background bitmap. below ErrorLevel.

- **warnFore Foreground**

  Warn level foreground color.

- **warnHl Foreground**

  Warn level highlight color.

- **warnIbd Foreground**

  Warn level internal border.

- **warnLevel WarnLevel**

  When statistic is above this level and below ErrorLevel background colors and bitmaps are set to WarnBack and WarnBitmap.

- **warnProg Program**

  Program to be invoked when a meter enters warn state.

## BUGS

When a host doesn't respond it can sometimes take a while for the labels in the menubuttons to update.

The width and height of the stripchart widgets need to be initialized to a non zero value or the error "Widget has zero width and/or height" will be printed by the X toolkit.  This can be done by the user or in the application defaults file.  The supplied application defaults file initializes width and height to 80.

## AUTHOR

Bob Schwartzkopf, The RAND Corporation.  Based on xload from MIT.
