A
graphical front-end for Collect.
/usr/sbin/collgui
[
[-b[
batchfilename] ] [-c
]
[-d] [-vga] [-size[
num] ] [
file [file
[...] ] ]
/usr/sbin/collect
[-Ddevice1,
[
device2, ... deviceN] ]
-c
Enables
collgui to reflect dynamic CPU changes on the target system that occurred
during the data collection period. By default, collgui only reflects the
hardware configuration at the start of the collection period.
Creates
a shell script to replay an entire session.
Turns
on debugging output.
Displays
and continuously updates the current values.
Sets
the fontsize to
number,
which influences size of window. The default size is 12.
Allows
collgui to be used on a VGA-sized (640x480) display.
collgui
helps evaluate data collected by Collect. It operates as a go-between among
Collect,
cfilt,
and
gnuplot.
Understanding
cfilt
is particularly helpful if you want to do complicated or non-standard things.
Help on
cfilt
can be obtained by reading the
cfilt(1)
reference page or invoking the usage command
cfilt-h.
collgui
automates the extraction of information from a binary data file written
by Collect, and directs it to
gnuplot
to produce a graphical rendition of the data.
The
utilities
collgui and
cfilt
are written in perl for thorough data processing, and therefore are slow
in operation. This is reflected in
collgui's
slow startup time, but doesn't have an important impact on continued operation.
collgui
offers two different methods for selecting samples for graphing. Close
to the top of the GUI, you can set the
START
and
END
times. These arguments get passed to Collect. If your data file contains
lots of samples, but you only want a fraction of them, using
START
and
END
will substantially speed up your extraction because the selection is handled
by Collect itself. Further down, you can set an
X
Range for
gnuplot.
This has similar effect as setting
START
and
END,
but Collect provides all samples, and
cfilt
must extract for all selected subsystems from this data. This is slower.
The difference is where the time selection is done. You may want to set
START
and
END,
and still set the
X
Range in order to give
gnuplot
explicit instructions as to what should be displayed.
gnuplot
tends to use round numbers for the beginning and end of ranges.
If
you invoke
collgui
with the
-live
option, the times displayed in the
START
and
END
fields are the times for a very short Collect run that gathers the system
configuration for the number of CPUs and disks. Do not change them; in
live mode X Units are always samples.
When
you save a user-defined setting/configuration, a unique ID is saved with
it, consisting of filename (no path) plus file size. When you recall this
setting, if the unique ID of your current open data file matches the saved
one, values such as
START,
END,
X-range,
Y-range,
average
samples,
X-
units, and
samples
w/process data are also restored. If the unique ID's don't match,
then only the subsystem settings are restored.
The
following features aid in selection.
The
mechanism for selecting one of many objects (such as LSM Volumes, Disks,
Tapes, Single CPUs) can be selected is particular. If there are less than
a fixed number of objects (~30), a Menu Button is created (when
Add
is pressed a dropdown list is presented). If the number is greater than
this constant, a separate window is created with a listbox containing all
possible objects. Doubleclicking on an object in the listbox will add it
to the selection list.
The
selection mechanism for processes is always a separate window with a listbox
and a slider marked
sample
and a button marked
List
Processes next to it. Using the slider, a sample (record) can be
selected from the collection period, and double clicking on a process will
enter its PID in the selection listbox. Currently, it is only possible
to select processes using their PIDs. In the future it may be possible
to select using usernames or commands. At the top of each column is a button
that turns red when the mouse is over it. Pressing the button will sort
the list using the values in the button's column.
|
|
Top
menus and buttons
|
File
|
A dropdown selection list presenting the following
selections:
|
Open
|
Opens a dialog box with a directory browser for selecting
Collect binary data files. The top window displays selected files, the
lower window displays the selection list, and the left window browses directories.
Doubleclick on a file to add it to the selection list, click the Delete
button to delete a file from the list, and click OK when you are finished
selecting. Collect reads input files in the order of this list.
|
Exit
|
Choosing Exit closes collgui.
|
Options
|
A dropdown selection list presenting the following
selections:
|
Legend Position
|
Set the position of the labels for the various lines
graphed. Options are Right Top, Right Bottom, Below, and
None.
|
X Axis Label
|
Provides ON/OFF toggle for label, providing choice
in graphing space.
|
X Axis Time Format
|
Controls the time label format, providing these choices:
MM:SS
HH:MM:SS
DD/HH:MM:SS
MM-DD/HH:MM:SS
2 lines: MM-DD/HH:MM:SS
|
X Axis Units
|
Provides unit choice of Time or Samples.
|
Set Y Label
|
Allows you to specify the label for the Y-Axis, rather
than using the default, KB/Transfers/Packets/Pages/etc.
|
Image Format
|
Provides choice of the following image formats:
JPEG
PBM
PPM
PS(20pt
PS(10pt)
|
Image Scale
|
Provides choice of the following image scales:
0.25
0.5
0.75
1.0
1.25
1.5
1.75
2.0
|
Graph Style
|
Provides a choice of Lines or Bars.
|
Font Size
|
Provides a choice of Bigger or Smaller.
|
Settings
|
A dropdown selection list presenting the following
selections:
|
Save
|
Saves the current configuration; that is, all the
information needed to reproduce the current graph. The information is saved
in
$HOME/.collguirc and read in on start.
|
Delete
|
Opens the dialog box Delete
a User Defined Configuration. This dialog lists user-defined settings.
Doubleclicking on an entry will remove it from the list, clicking on Commit
will save your changes.
|
Built In
|
Provides some basic default settings for looking
at data:
Disk(summary): Transfers/s,KB/s
Network: Packets/s,KB/s
Basic: I/O,Net,Mem,CPU
Memory: Free,Paging
|
User Defined
|
Opens a dialog box to define your configurations.
|
DISPLAY
|
Graphs your selections in a Gnuplot display.
|
ALL
|
Refreshes the display of all Gnuplot windows. Use
it after changing the time range.
|
PRINT
|
Sets the output device to postscript,
and opens a dialog box to choose the output file, which can be redirected
to a printer.
|
JPEG
|
Opens a dialog box to choose the output image file
in the corresponding format.
|
RESET
|
Restores the GUI to default values.
|
START and END
|
Use these entries to specify a time-range for extracting
samples from the binary data file. They are set to the times of the first
and last sample respectively (of the whole run) when you open a file. The
RESET button at the bottom of the window will restore these to their default
values. This is the fastest method for extracting a sub-range from your
collection period, as these values are passed directly to collect during
playback.
In live mode these fields are ignored.
|
X: From To
|
Set the range for the X coordinate. Accepts Time
units. In live mode the number of samples per window can be set in this
field.
|
Y: From To
|
Set the range for the Y coordinate.
|
Average Samples
Intervals
|
Enter the number of samples to average over. In live
mode this field is replaced by Interval
to adjust the sampling period (default is 2s).
|
Samples w/Proc
|
Samples w/Process Data can be toggled on/off. This
allows you to plot intermittently gathered process data against constantly
gathered other data. Clicking this button on
will use only samples with data, preventing the output of zeros for samples
for which no data was gathered.
For example:
Collect process data at four-second intervals and plot against CPU
Idle Time (gathered every second). Zero process data will be reported for
3 of every 4 samples because none was gathered. Toggle Samples
w/Proc on and only samples with data will be used; in this case,
every fourth sample.
|
Win
|
A dropdown list provides selection of the window
to use for the next display command. You can reuse an existing window or
select a new number to create a new window. To close a window, type q
in the window.
When creating a new window, the data selection settings of the previous windows
are saved for the refresh by ALL button. However, before you create a new window,
the setting of the earlier one is left in place, so make sure to clear
the setting if it doesn't fit the need of the new window.
|
X Units
|
Allows you to specify either time
or samples
for the horizontal axis of the graph.
|
Subsystem
Section
Single CPU
Processes
Disks
LSM Volumes
Tapes
Message Queues
Network
Filesystems
CPU Summary
Memory & Swap
Terminal IO
|
All of the subsections have a toggle for sum,
buttons for Add/No
Data, Delete, Expressions,
and Clear,
plus a text entry box.
The sumcheckbox
is the equivalent of adding a plus sign at the end of a subsystem name
in an expression.
The No
Data button changes to Add
when a data file is opened, and Expressions is
no longer grayed out.
The Add
button opens a dropdown list for data sources with choices appropriate
to each subsystem. The Delete
button removes a selected data source. The Expressions
button functions similarly, with an appropriate dropdown list, and Clear
button removes a selected expression. You may use the text box to directly
enter an expression.
|
If
you wish to start working with
collgui
without first studying
cfilt,
use this example as a guide:
Take Disks
for an example. If you click on Expressions
and select KB/Sec,
then, without selecting any specific disks, click on the DISPLAY
button, you will get the TOTAL
KiloBytes/Second throughput for all disks for which data was collected.
Data is totalled because the list on the right is empty. cfilt
assumes, since you have not selected any particular disk(s), you want a
grand total. If, however, you now add rz0
and rz1
(assuming these disks exist on your system, and you collected data for
them), two lines will be graphed, KB/Sec for rz0 and KB/Sec for rz1. If
you click on Expressions
and select %Busy,
you will get 4 lines: KB/Sec and %Busy for rz0, and KB/Sec and %Busy for
rz1. If you click on the sum
Checkbutton, (and the DISPLAY),
you will get only 2 lines this time: KB/Sec for rz0+rz1, and %Busy for
rz0+rz1. sum
sums over all objects in the listbox, or over all objects for which data
was collected if no specific object has been selected (the listbox is empty).
It is sometimes useful to graph dissimilar data together, for example CPU
Idle and Disk
KB/sec. Using gnuplot,
you only have one vertical scale. In order to get such incongruous data
together in a reasonable fashion on the same graph, data may have to be normalized
(scaled to fit into a particular range, typically 0-100). Placing a number
sign (#) on the end of an expression will normalize the data. Many expression
possibilities offer Normalized
and Raw
options. The only difference is the percent sign on the end of the expression.
You can choose the end of the normalized range yourself by giving that
value after the percent sign, for example:
disk:rkb/s+wkb/s#150
The Normalize
option is disabled in live mode, but you can still apply arithmetic to
the values for display, for example, divide them by 200:
disk:rkb/s+wkb/s~200
The
following features enhance batch operations with collgui:
To
create a shell script that replays an entire session, use the
-b
option (
collgui -bbatch_file).
To prevent destroying data files, collgui stops if
batch_file
already exists. The script has two optional arguments, the time slice in
the
-C
Collect syntax and the Collect file name.
To
reuse the script with another time slice, use the following syntax:
batch_file-Cyy:mm:dd:hh:mm:ss,yy:mm:dd:hh:mm:ss
To
take the entire time range, use empty single quotes (` `) as the argument.
To
reuse the script with another Collect file, use the following syntax:
The
-b
option records the full pathname of the graphics created by JPEG (or other
graphic format) button. Then you can edit the script to replace the a part
of the pathname with $3, adding a third argument that will be the prefix
of the graphics file names.
You
can edit the script to modify some gnuplot line attributes, for example,
adding at the end of the plot command line:
"
` /tmp/collbat.$$.1' using 1:4 title `cpu=user+sys'\ with lines lw 2,"
For
more information on gnuplot capability, type gnuplot, then type help.
span
style="color: #000000; font-size: 10pt; font-style: normal; font-weight:
normal; text-decoration: none; text-transform: none; vertical-align: baseline">collgui
relies on the default colors of Tk. However, under CDE there are problems.
If you have difficulty seeing text in the entry widgets, try placing the
following lines in your ~/.Xdefaults file.:
Collgui*foreground:
black
Collgui*background:
white
Merge
this change into your in-memory resource database using the following command:
The
following restrictions apply when using
collgui:
Using
large data files causes a slow start for
collgui.
Once the file has been parsed, normal operation resumes.
-
Use the following syntax to run collgui
in the live mode:
-
Use the following syntax to view a compressed data
file:
The
name and path of
collect,
if other than
collect,
or if is not your path. For example,
collect3
or
/usr/foo/bin/collect4.
The
name and path of
cfilt,
if other than
cfilt,
or if
cfilt
is not your path.
The
name and path of gnuplot, if other than gnuplot, or if gnuplot is not your
path.
The
name and path of the
cjpeg
program, used to convert PPM image files to JPEG.
Commands:
cfilt(8),
collect(8)
Manuals:
System
Configuration and Tuning Guide,
System Administration Guide