stripchart
<<< Previous |  | Next >>>

# Parameter Settings

The parameters displayed by the `stripchart` can be examined and edited using the Parameter Editor window. Although `stripchart` provides great potential for adding custom parameters, most users will initially be satisfied with the selecting from the list of pre-configured parameters supplied. Adding or deleting these parameters is described in the section called Parameter Editor Quickstart Guide.

Figure 10. Parameter Window

## Parameter Editor Quickstart Guide

To delete one of the currently active parameters:

- Select the parameter to be deleted by clicking on its tab at the bottom of the Parameter Editor window;

- Select the Edit menu item;

- Select the Delete Parameter menu item.

To add one of the pre-defined parameters:

- Select the Edit menu item;

- Select either the Add Parameter Before or the Add Parameter Before menu item to insert a new empty parameter page;

- Select one of the pre-defined parameters from the parameter itemlist on the "Parameter" line of the page. This will fill in the required fields for the newly created parameter, and begin plotting it.

## Creating Custom Parameters

The creation of a custom parameter can be done by editing an existing parameter, by adding a new parameter and editing it, or by adding a new parameter and filling in the parameter fields from scratch. Many of the parameter fields can be left blank. While good style dictates that a parameter name and description be provided for documentation purposes, the only mandatory fields are those required to obtain a value to be plotted. Generally, the Equation field will fill this role. The details of each of these fields are described below.

Parameter

  A short descriptive name for the parameter.

Description

  A longer description of the parameter.

Filename

  The name of a file from which equation parameters are obtained. On each iteration, a line is read from this file. If a pattern was supplied, lines are read until one is found that contains the pattern string anywhere in the line. This line is split into a series of whitespace separated fields, each of which is interpreted as a floating point number. The first (or only) value is denoted by $1, the next by $2, and so forth. The difference between the field values from the previous to the current iteration is denoted by ~1, ~2, and so forth.

  If a filename beginning with a "|" is supplied, input lines will be read from a pipe instead of a file. Lines read from this pipe will be processed identically to lines read from a file as described previously.

  If a filename beginning with a "?" is supplied, the file status determines the value to be plotted: -1 for a non-existent file, 0 for a file of zero length, 1 for a file with an access time that is newer than its modification time, and 2 for a file with a modification time that is newer than its access time. These values are useful in displaying the status of a mailbox file.

Equation

  An equation used to obtain the value to be plotted for this parameter. The equation is made up of parameters which are combined using the usual infix arithmetic operators.

  There are several sources for equation parameters.

  - The parameters can be obtained by reading a line from a file. This method of obtaining equation parameters is described under the previous Filename section.

  - There are a number of built-in parameters. The elapsed time in seconds between the last and current iteration is ~t. The elapsed time in seconds since the `stripchart` program was started is $t.

  - There are a number of parameters provided by the libgtop library. These are described in the section called libgtop Values.

  The usual infix arithmetic operators — addition (+), subtraction (-), multiplication (*), division (/), and remaindering (%) — are available, along with parenthesis for grouping subexpressions, and unary minus (-) to negate a value. Grouping and negation have the highest precedence; multiplication, division, and remaindering have the next highest precedence; and addition and subtraction have the lowest precedence.

Pattern

  If the filename field specifies a file containing more than a single line of text, the pattern field can be used to select the line from which equation parameter values will be obtained. Lines will be read from the file until a line containing the specified pattern is found, or until the end of file is reached. If no pattern is provided, the first line of the file is used.

Top Min, Top Max, Bottom Min, Bottom Max

  The minimum and maximum to be used for the value at the top and bottom of the chart.

Scale

  The type of scaling to be performed on the parameter values before they are plotted: either linear or logarithmic.

Type

  The type of plot to be generated for this parameter value. The value can be plotted as an indicator, a small square in the upper left corner of the window; as a line drawn between successive parameter values; as a point for each parameter value; or as a solid, with the area below each parameter value solidly filled in.

Color

  The color or colors to be used when plotting this parameter value. For an indicator plot, a series of colors are used, the first for parameter values of one, plus or minus one-half, two, plus or minus one-half, three, plus or minus one-half, and so on. For line, point, and solid plot types, only a single color is used.

## libgtop Values

Normally, the `stripchart` program will be built with the libgtop library linked in. The libgtop library provides a portable and well-standardized method of accessing common system performance parameters. This is the preferred method of obtaining a value to be plotted.

The following libgtop parameters are available:

- CPU Statistics — cpu_total, cpu_user, cpu_nice, cpu_sys, cpu_idle, and cpu_freq

- Memory Statistics — mem_total, mem_used, mem_free, mem_shared, mem_buffer, mem_cached, mem_user, mem_locked

- Swap Statistics — swap_total, swap_used, swap_free, swap_pagein, swap_pageout

- Uptime Statistics — uptime, idletime

- Loadavg Statistics — load_running, load_tasks, load_1m, load_5m, load_15m

- Network Statistics — net_pkts_in, net_pkts_out, net_pkts_total, net_bytes_in, net_bytes_out, net_bytes_total, net_errs_in, net_errs_out, net_errs_total

  Note that the network statistic values don't use the libgtop library. Instead, they are read directly from /proc/net/dev, and so are only available under Linux.

These are all signed long integer quantities, except for uptime, idletime, and the five load values which are floating point values.

<<< Previous | Home | Next >>>
Preference Settings |  | Configuration and Parameter Files