summaryrefslogtreecommitdiff
path: root/man/man5/pmview.5
blob: f60bfec9639d506d067ffd565d5c0754e083bde5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
.TH PMVIEW 5 "" "Performance Co-Pilot"
.SH NAME
\f3pmview\f1 \- configuration file format for performance 
.SH DESCRIPTION
This man page describes version 2.1 of the
.B pmview
configuration file format.
.PP
The configuration format supports metrics from multiple hosts or archives.  A
configuration file can specify metrics without a source, with different hosts
and different archives.  However, a configuration file that contains archives
may only have one archive for anyone host.  When in ``replay'' mode, any 
metrics with host specific sources require an archive to be specified for that
host on the command line or as a source to a previous metric.  The archive must
be the same archive (based on a string comparison of the archive names) of any
archives specified in the configuration file for the same host.
.PP
The time controls will list all hosts that are specified on the command line
and the configuration file in the timezone listing (see 
.BR pmtime (1)).
.PP
The configuration file format is based on a two-dimensional grid which
can contain a variety of bars, stacks, links, pipes, labels and other
grids.  The grids resize each column and row to match the size of the
largest item in that column or row.  A configuration file that
contains only one object does not require a grid. The
.B pmview
configuration file starts with an identification header in the first
non-comment line:
.PP
.in 1.0i
.ft CW
.nf
pmview Version 2.1 \f2[command_line]\f1
.fi
.ft R
.in
.PP
The optional
.I command_line
should be the command line with which the tool was launched, if the
configuration file has been generated by another tool.  This is useful for
applications that are to be restarted automatically on the next login, after
the user has logged out while
.B pmview
was still running.
Care should be taken to ensure that the command specified is either a
full pathname or will be found on the PATH available at login.
.PP
All lines which begin with ``#'' are treated as comments and
ignored.  Otherwise, all spaces, tabs and newlines are treated as white space
so multiple commands may be on the same line.
.PP
The syntax for specifying values in the configuration file is consistent for
all commands, namely:
.TP 4n
.I color
A color must be either a 
.BR X (1)
color name, a
.BR X (1)
numerical color, or three normalized
.I real
values representing the saturation of red, green and blue.  For example,
the following colors are identical:
.PP
.in 1.5i
.ft CW
.nf
red
rgbi:1.0/0.0/0.0
1.0 0.0 0.0
.fi
.ft R
.in
.TP 4n
.I int
An integer.
.TP 4n
.I metric
A metric consists of an optional source (host or archive), the metric name,
an optional instance list immediately after name, followed by the maximum (or 
normalization value).  A colon (``:'') is used to separate a host name from the
metric, and a forward slash (``/'') to separate an archive name from the
metric.  Instances are enclosed in square brackets and comma separated.  Each
instance may be enclosed in quotes.
.IP
For example, some legal metrics are:

.in 1.5i
.ft CW
.nf
kernel.all.cpu.idle 4000
myhost:kernel.all.cpu.idle[cpu0,"cpu3"] 1000.0
/path/to/myarchive/kernel.all.cpu.idle[cpu1] 1000
.fi
.ft R
.in

To assist the process of matching instance names, two further comparisons are
made beyond a simple string comparison.  If the instance name contains
spaces, only the first word in the instance name is required to match the
instance, assuming that the first word is unique.  If the first word is not
unique, only the first matching instance will be selected.  The second
comparison occurs if the first word is a number with leading zeros.  Any
leading zeros will be skipped before comparing the first word again.  This
permits process ids used in the
.I proc
metrics to be easily matched, without specifying the entire instance name.  For
example, to visualize the user and system time of 
.I init 
use the metric specification

.in 1.5i
.ft CW
.nf
proc.psusage.utime[1]	1000
proc.psusage.stime[1]	1000
.fi
.ft R
.in
.TP 4n
.I name
A name for an object which may be referred to later in the configuration file.
Names must be a single word consisting of all alphanumeric characters, as well
as underscores, dashes and colons.  It is recommended that names do not begin
with an underscore as this may be interpreted as a keyword.
.TP 4n
.I pos
This is the position of the object within the grid.  The syntax of a position
is:
.IP
.in 1.0i
[ [\f2x\f1 \f2z\f1] [ [\f2width\f1 \f2depth\f1] [\f2alignment\f1] ] ]
.in
.TP 14
.I "       x"
The horizontal coordinate (left to right) of the object, starting at 0.  The
default
.I x
is 0.
.TP
.I "       z"
The vertical coordinate (top to bottom) of the object, starting at 0.  The
default
.I z
is 0.
.TP
.I "       width"
The number of columns occupied by the object.  The default
.I width
is 1.
.TP
.I "       depth"
The number of rows occupied by the object.  The default
.I depth
is 1.
.TP
.I "       alignment"
The edge or corner that the object is aligned with.  Possible alignments
include: \f2north\f1, \f2south\f1, \f2east\f1, \f2west\f1, \f2northeast\f1,
\f2northwest\f1, \f2southeast\f1, \f2southwest\f1 and \f2center\f1.
Abbreviations like \f2se\f1 and \f2SE\f1 are also accepted.  The default
alignment is \f2center\f1.
.IP
The size of an object may not be known as the number of instances for some
metrics will vary between hosts and 
PMDA
configurations.  Therefore, the position of the object can be used to specify
the likely size of the object, so that the position of the surrounding objects
is appropriately adjusted.
.IP
The following are legal positions:
.TP 21
.ft CW
              0 5
.ft R
The object is centered at grid position 0,5 occupying 1 grid square.
.TP
.ft CW
              1 2 north
.ft R
The object is aligned with the north edge of position 1,2 occupying 1 grid
square.
.TP
.ft CW
              2 2 2 1 east
.ft R
The object is aligned to the eastern edge of position 3,2 and occupies 2 grid
squares (2,2 and 3,2).
.TP 4n
.I string
A string is a series of characters enclosed in double quotes.  A string may
not contain newlines or escaped double quotes.

.PP
There are several parameters that may affect the size, shape and color of
objects when they are displayed.  These parameters are scoped so that they only
alter objects defined later in the same scope.  Therefore, parameter settings
at the top of a configuration file affect the entire scene, unless they are
changed later in the file.  Most of these parameters are also resources.
.TP 4n
\f3_barLength\f1 \f2int\f1
The side length of the
.B _bar
and
.B _stack
blocks.  Default is 28.
.TP 4n
\f3_barHeight\f1 \f2int\f1
The maximum height of a
.B _bar
and
.B _stack
blocks.  Default is 80.
.TP 4n
\f3_baseColor\f1 \f2color\f1
The color of 
.BR _bar ,
.B _grid
and
.B _stack
base planes.  Default is rgbi:0.15/0.15/0.15.
.TP 4n
\f3_baseHeight\f1 \f2int\f1
The height of
.BR _bar ,
.B _grid
and
.B _stack
base planes.  Default is 2.
.TP 4n
\f3_gapWidth\f1 \f2int\f1
The gap between blocks in a 
.B _bar
object in the X-axis.  The default is 8.
.TP 4n
\f3_gapDepth\f1 \f2int\f1
The gap between blocks in a 
.B _bar
object in the Z-axis.  The default is 8.
.TP 4n
\f3_gapLabel\f1 \f2int\f1
The gap between the base of a
.B _bar
object, and any metric or instance labels.  The default is 6.
.TP 4n
\f3_gridWidth\f1 \f2int\f1
The minimum width of a
.B _grid
column.  The default is 20.
.TP 4n
\f3_gridDepth\f1 \f2int\f1
The minimum depth of a
.B _grid
row.  The default is 20.
.TP 4n
\f3_labelMargin\f1 \f2int\f1
The margin around a
.B _label
object.  The default is 5.
.TP 4n
\f3_labelColor\f1 \f2color\f1
The color of 
.B _label
and
.B _bar
labels.  The default is white.
.TP 4n
\f3_marginWidth\f1 \f2int\f1
The extra width of a
.BR _bar ,
.B _grid
and
.B _stack
base plane beyond the objects on the plane.  The default is 8.
.TP 4n
\f3_marginDepth\f1 \f2int\f1
The extra depth of a
.BR _bar ,
.B _grid
and
.B _stack
base plane beyond the objects on the plane.  The default is 8.
.TP 4n
\f3_pipeLength\f1 \f2int\f1
Total length of a
.BR _pipe.
The default is the value of
.BR _barHeight.
.TP 4n
\f3_scale\f1 \f2real\f1
The scale applied to the entire scene.  This parameter may not be used within
any objects, only at the top of the configuration file.  The default is 1.0.
.PP
To simplify the specification of colors, a
.B _colorList
and a 
.B _colorScale
may be used to define colors for an object which has metrics
associated with it, i.e. 
.BR _bar ,
.B _stack
or
.BR _pipe .
A color list may be defined within an object, or named and defined at
the top of a configuration file.  A named color list may then be referenced
within multiple objects:
.TP 4n
\f3_colorList\f1 \f2name\f1 \f3(\f1 \f2color\f1 [\f2color\f1...] \f3)\f1
Associate the
.IR color s
with the color list
.IR name .
The assignment of colors to blocks depends on the type of an
object.  For example, the color list called 
.I foo
has the same color three times:

.RS 4
.ft CW
.nf
_colorList foo ( red rgbi:1.0/0.0/0.0 1.0 0.0 0.0 )
.fi
.ft R
.RE

.TP 4n
\f3_colorScale\f1 \f2name\f1 \f2color\f1 \f3(\f1 \f2color\f1 \f2real\f1 [\f2color\f1 \f2real\f1...] \f3)\f1
Associate the
.IR color s
and
.IR real s
with the color list
.IR name .
The initial
.I color
is the default color of the object.  The object will change color to the other
colors when the normalized value of the object is equal to or greater than
each
.IR real .
Therefore, each
.I real
must be larger than the previous 
.IR real ,
and should be in the range 0.0 to 1.0.  This scale gradually changes from blue
to red:
.PP
.RS 4
.ft CW
.nf
_colorScale coldToHot blue ( rgbi:0.5/0.0/1.0 0.3 
                             purple 0.6 
                             rgbi:1.0/0.0/0.5 0.8 
                             red 0.95)
.fi
.ft R
.RE
.PP
There are several different object types which could be found in a
.B pmview
scene: 
.BR _bar ,
.BR _stack ,
.BR _pipe ,
.BR _grid ,
.BR _link , 
and
.BR _label .
There is also
.B _xing
which is a special type of the
.BR _link .
The
.BR _bar ,
.B _stack
and
.B _pipe
objects are modulated by metric values, a
.B _label
is fixed text, 
.B _link
and
.B _xing
are interconnects and a
.B _grid
is a container of objects, including other
.B _grid
objects, which controls the layout of the scene.  A 
.B _grid
object is only required if there are two or more objects in the scene.
.PP
.BR _bar ,
.B _grid
and
.B _stack
objects may have base planes which provide a point of reference for the blocks
as they change height.  A label can be applied to the base plane 
.B _grid
object if it is
.B _shown
with:

.in 1.5i
.ft CW
.nf
\f3_baseLabel\f1 \f2name\f1|\f2string\f1
.fi
.ft R
.in

.B _baseLabel
should be used within the scope of the relevant
.BR _bar ,
.B _grid
or
.B _stack
object.  The first ``\\n'' characters in the string will be replaced by a new
line.  Subsequent ``\\n'' characters will be ignored.
.PP
For a scene to be valid it must contain at least one modulated object.
.PP
The objects are defined as:
.TP 4n
\f3_bar\f1 [\f2options\f1] \f3(\f1 [\f2metric-list\f1] [\f2color-list\f1] [\f2label-list\f1] \f3)\f1
A
.B _bar
object represents a collection of blocks.  The number of blocks depends on the
number of metrics and metric instances assigned to the object.  By default, the
blocks are modulated by changing the height of each block.  Alternatively,
blocks may be modulated by changing color, or both height and color.  Each
color in the
.I color-list
is assigned to each metric.  Therefore, multiple instances of the one metric
will have the same color.  The
.I options 
that may be passed to a
.B _bar
object are:
.RS 4n
.TP 4n
.I pos
The position of the 
.B _bar
object within the current
.B _grid
object.
.TP 4n
\f3_col\f1|\f3_row\f1
Position the blocks so that each instance is in a column
.RB ( _col )
or a row
.RB ( _row ).
This implies that each different metric is in a separate row or column,
respectively.  The default is
.BR _col .
.TP 4n
\f3_show\f1|\f3_hide\f1
Is the base plane visible? Default is
.BR _show .
.TP 4n
\f3_ymod\f1|\f3_colormod\f1|\f3_colorymod\f1
Modulate the blocks by adjusting their height
.RB ( _ymod ),
color
.RB ( _colormod )
or both height and color
.RB ( _colorymod ).
.TP 4n
\f3_cube\f1|\f3_cylinder\f1
Set the shape of the blocks.  The default is
.BR _cube .
.RE
.RS 4n
.TP 4n
\f3_groupbymetric\f1|\f3_groupbyinst\f1|\f3_groupbyrow|\f1|\f3groupbycol\f1
Set the grouping of blocks when launching other tools. For tools like
.BR pmchart (1)
some views may generate many small charts which cannot be drawn entirely within
the screen.  Another problem is it may be more appropriate to generate charts
with the same instance in each chart, rather then the same metric.  The group
specifiers control the algorithm used so that a separate chart will be drawn
for each 
.B _metrics
specification
.RB ( _groupbymetric ),
for the first, second etc. instance of each
.B _metric
.RB ( _groupbyinst ),
or by the rows and columns of the
.B _bar
object depending on
.B _row
or
.BR _col .
The default is
.BR _groupbymetric .
.PP
The options must be specified in this order, although preceding options are
not required.  Therefore, this is legal:

.in 1.5i
.ft CW
.nf
_bar _hide _cylinder ( ... )
.fi
.ft R
.in

The metrics, colors and labels are specified within the brackets in any order.
Only the 
.I metric-list
is mandatory.
.TP 4n
.I metric-list
A 
.B _bar
metric list contains a list of metric names, normalization values and an
optional label for the metric:

.RS 4n
.ft CW
.nf
\f3_metrics\f1 \f3(\f1 \f2metric\f1 \f2real\f1 [\f2string\f1] [\f2metric\f1 \f2real\f1 [\f2string\f1]...] \f3)\f1
.fi
.ft R
.RE

.TP 4n
.I color-list
A 
.B _bar
color list may be a named color list that was defined earlier, or an unnamed
color list.  A 
.B _colorScale
list should be used when using
.B _colormod
or
.B _colorymod 
modulation.  Therefore, the syntax for color lists within a 
.B _bar
object are any of:

.RS 4n
.ft CW
.nf
\f3_colorList\f1 \f2name\f1
\f3_colorList\f1 \f3(\f1 \f2color\f1 [\f2color\f1...] \f3)\f1
\f3_colorScale\f1 \f2name\f1
\f3_colorScale \f2color\f1 \f3(\f1 \f2color\f1 \f2real\f1 [\f2color\f1 \f2real\f1...] \f3)\f1
.fi
.ft R
.RE
.TP 4n
.I label-list
In addition to labels for each metric in the
.IR metric-list ,
metric and instance labels may be defined using
.B _metriclabels
and
.B _instlabels
statements.  The position of the labels around the
.B _bar
object depends on the
.B _row
or
.B _col
orientation of metrics and instances, and whether the label is read
.B _towards
the
.B _bar
object, or
.BR _away .
The default is
.BR _towards .

.RS 4
.ft CW
.nf
\f3_metriclabels\f1 [\f3_away\f1|\f3_towards\f1] \f3(\f1 \f2name\f1|\f2string\f1 [\f2name\f1|\f2string\f1...] \f3)\f1
\f3_instlabels\f1 [\f3_away\f1|\f3_towards\f1] \f3(\f1 \f2name\f1|\f2string\f1
[\f2name\f1|\f2string\f1...] \f3)\f1
.fi
.ft R
.RE

.RE
.TP 4n
\f3_grid\f1 [\f2pos\f1] [\f3_show\f1|\f3_hide\f1] \f3(\f1 \f2objects\f1 \f3)\f1
A 
.B _grid
object is a container for objects, including other
.B _grid
objects.
The rows and columns of a 
.B _grid
object are resized to the largest object in the row or column.  If an object
spans multiple rows and/or columns, those rows and columns may be partly
resized to contain the object.  However, the resizing of rows and columns for
objects occupying multiple rows and columns occurs after resizing for objects
occupying only one grid square.

A collision between objects occupying the same squares will be reported as an
error message and the later object will be ignored.

The options to a
.B _grid
object control the position 
.RI ( pos )
of the 
.B _grid
object in the parent 
.BR _grid ,
and indicate whether to
.B _show
or
.B _hide
the 
.B _grid
base plane.  By default, the base plane is hidden.

The parameters described above may be specified within the brackets of a
.B _grid
object, however they only apply to the objects within the
.BR _grid ,
not the
.B _grid
itself.  For a parameter to be applied to a 
.B _grid
object, it must be specified before the
.B _grid
object declaration.

.RE
.TP 4n
.I "\f3_label\f1 [\f2options\f1] \f2string\f1"
A
.B _label
object draws the contexts of
.I string
at the location, orientation and size specified in the 
.IR options :
.RS 4n
.TP 4n
.I pos
The position of the
.B _label
object
in the current
.B _grid 
object.
.TP 4n
\f3_left\f1|\f3_right\f1|\f3_up\f1|\f3_down\f1
The orientation of the 
.IR string .
The direction indicates the direction the label is read.  Therefore,
.B _right
is the default since the string is read from left to right.
.TP 4n
\f3_small\f1|\f3_medium\f1|\f3_large\f1
The font size.  The default is
.BR _medium .
.RE

.RE
.TP 4n
\f3_link\f1 \f2pos\f1 [\f2string\f1]
A
.B _link
object draws a straight or L-shaped horizontal round ``pipe'' with
diameter equal to 80% of the
.I _baseHeight
of an enclosing
.BR _grid .
The properties of the object are defined by the options:

.RS 4n
.TP 4n
.I pos
sets both the position of the
.B _link
on the grid and its shape.
.B _link 
starts in the column and row on the 
.B _grid 
specified by first two numbers in the
.I pos
and spans the number of columns and rows set by the second two
numbers. The
.I alignment
value is used to decide the orientation of the link (links are always 
aligned at the center):
.I east
and
.I west
links are straight and going from left to right,
.I north
and
.I south
links are straight and going from far end of the grid to near end,
.I northeast,
.I northwest,
.I southeast
and
.I southwest
links are L-shaped and connect the corresponding points of the compass, 
i.e. a
.I northeast
link takes on the general shape of the Latin letter ``L''.
.TP 4n
.I string
sets the ``tag'' for the
.B _link
which will be displayed in the text window when the pointer is over the
link.
.RE


.RE
.TP 4n
\f3_pipe\f1 \f2pos\f1 \f3(\f1 [\f2metric-list\f1] [\f2color-list\f1] [\f2tag\f1] \f3)\f1
A
.B _pipe
object represent a set of cylinders, placed on top of each other and
oriented parallel to the base plane. The diameter of a
.B _pipe
is equal to 80% of
.IR _baseHeight .
The number of blocks is dependent on the number of
metric instances in the
.IR metric-list .
The colors in the
.I color-list
are assigned in turn to each cylinder in the
.BR _pipe .
The length of the
.B _pipe 
is defined by the
.IR _pipeLength .

.RS 4n
.TP 4n
.I pos
defines the position of the
.B _pipe
on the enclosing
.B _grid
and its orientation with
.I alignment
field used to define at which end of the pipe to stack the colored
cylinders. The cylinders are stacked at the corresponding point of the
compass and the pipe's direction is from the point of the compass
towards the center of the compass. Only 
.IR east ,
.IR west ,
.IR north ,
and
.I south
are valid values for the pipe's alignment.

.RE
The metrics, colors and label may be specified within the brackets in any
order.  Only the
.I metric-list
is mandatory.
.TP 4n
.I metric-list
A
.B _pipe
metric list contains a list of metric names and normalization values:

.RS 4n
.ft CW
.nf
\f3_metrics\f1 \f3(\f1 \f2metric\f1 \f2real\f1 [\f2metric\f1 \f2real\f1...] \f3)\f1
.fi
.ft R
.RE

.TP 4n
.I color-list
A
.B _pipe
color list may be named color list that was defined earlier, or an unnamed
color list:

.RS 4n
.ft CW
.nf
\f3_colorList\f1 \f2name\f1
\f3_colorList\f1 \f3(\f1 \f2color\f1 [\f2color\f1...] \f3)\f1
.fi
.ft R
.RE

.TP 4n
.I tag
A
.B _pipe
may have a ``tag'' for the filler block (unanimated block on the
``other'' end of the pipe) which will be displayed in the text window
when the pointer is over that end of the pipe.

.RS 4n
.ft CW
.nf
\f3_pipeTag\f1 \f2name\f1|\f2string\f1
.fi
.ft R
.RE

.RE
.TP 4n
\f3_stack\f1 [\f2options\f1] \f3(\f1 [\f2metric-list\f1] [\f2color-list\f1] [\f2label\f1] \f3)\f1
A
.B _stack
object represents a set of blocks placed vertically on top of each other.  The
number of blocks is dependent on the number of metric instances in the 
.IR metric-list .
The colors in the
.I color-list
are assigned to each block in the
.BR _stack .
By default, the height of the
.B _stack
will be the sum of the height of each block.  The
.I options
that may be passed to a 
.B _stack
object are:
.RS 4n
.TP 4n
.I pos
The position of the 
.B _stack
object within the current
.B _grid
object.
.TP 4n
\f3_show\f1|\f3_hide\f1
Is the base plane visible? Default is
.BR _show .
.TP 4n
\f3_utilmod\f1|\f3_fillmod\f1
Force the height of the stack to always be the maximum height.  This is achieved
by normalizing the height of each block
.RB ( _utilmod ),
or by adding a grey block to the top of the stack 
.RB ( _fillmod ).
.TP 4n
\f3_cube\f1|\f3_cylinder\f1
Set the shape of the blocks.  The default is
.BR _cube .
.RE
.RS 4n
.PP
The options must be specified in this order, although preceding options are
not required.  Therefore, this is legal:

.in 1.5i
.ft CW
.nf
_stack 1 1 _north _utilmod ( ... )
.fi
.ft R
.in

The metrics, colors and label may be specified within the brackets in any
order.  Only the
.I metric-list
is mandatory.
.TP 4n
.I metric-list
A
.B _stack
metric list contains a list of metric names and normalization values:

.RS 4n
.ft CW
.nf
\f3_metrics\f1 \f3(\f1 \f2metric\f1 \f2real\f1 [\f2metric\f1 \f2real\f1...] \f3)\f1
.fi
.ft R
.RE

.TP 4n
.I color-list
A
.B _stack
color list may be named color list that was defined earlier, or an unnamed
color list:

.RS 4n
.ft CW
.nf
\f3_colorList\f1 \f2name\f1
\f3_colorList\f1 \f3(\f1 \f2color\f1 [\f2color\f1...] \f3)\f1
.fi
.ft R
.RE

.TP 4n
.I label
A
.B _fillmod
type
.B _stack
may have a label for the filler block:

.RS 4n
.ft CW
.nf
\f3_stackLabel\f1 \f2name\f1|\f2string\f1
.fi
.ft R
.RE

.RE
.TP 4n
\f3_xing\f1 \f2col\f1 \f2row\f1 \f2columns\f1 \f2rows\f1 \f2dir1\f1 ... \f2dir4\f1
A
.B _xing
is a special kind of link which is used to draw a pair of links which
cross each other. To convey the visual impression that the links do
not join, one of the links is drawn as a ``broken'' cylinder.
.I col
and
.I row
define the position on the enclosing grid.
.I columns
and
.I rows
define the size of the bounding box. The end points of the crossing
cylinders are placed exactly in the center of the corner cells of the
bounding box and four small cylinders or stubs are used to join the
perimeter of the bounding box with the end points on the crossing
cylinders. Four
.I dir
values define the orientation of the stubs, starting at the upper left
corner of the
.B _xing
and proceeding clockwise, such that respective stubs are used to join
the point of the compass with the center on the cell (see example).
.RE
.SH EXAMPLE
This simple example illustrates the use of parameters and different object
types:

.in 1i
.ft CW
.nf
pmview Version 2.1
# Use a lighter grey for the base planes
_baseColor rgbi:0.5/0.5/0.5

# Define colors for CPU object
_colorList cpu ( blue2 red2 yellow2 cyan2 green2 )

# The top grid object, but hide it from view
_grid _hide (

# Show the current load in a bar object
   _bar 0 0 (
       _baseLabel "Load averages over a\\n1, 5 and 15 minute interval"
       _metrics (
		kernel.all.load[1] 1 "1"
		kernel.all.load[5] 1 "5"
		kernel.all.load[15] 1 "15"
	)
	_colorList ( blue blue blue )
    )

# Add a label below the load bars
    _label 0 1 "Load"

# Change the color of the base plane for later objects
    _baseColor pink

# Show the CPU usage over all CPUs in a utilization stack
    _stack 2 0 _south _utilmod (
	_baseLabel "CPU Utilization over all CPUs"
	_metrics (
		kernel.all.cpu.user 1000
		kernel.all.cpu.sys 1000
		kernel.all.cpu.intr 1000
		kernel.all.cpu.wait.total 1000
		kernel.all.cpu.idle 1000
	)
	_colorList cpu
    )

# Add a label below the CPU stack
    _label 2 1 "CPU"

# Create a separate grid for links and pipes
    _marginWidth 1
    _marginDepth 1
    _gridSpace  12
    _grid 0 3 5 4 _hide (
	_pipeLength 12
	_baseHeight 12

	# Add  a pipe and a link with western orientation
	_pipe 0 0 west (
	    _pipeTag "West pipe"
	    _metrics (
		kernel.all.cpu.user 1000
		kernel.all.cpu.sys 1000
		kernel.all.cpu.idle 1000
	    )
	    _colorList cpu
	)

	_link 0 2 west "West link"

	# Add xing
	_xing 1 0 3 3 west east east west 

	# Add a link and a pipe with eastern orientation
	_pipe 4 0 east (
	    _pipeTag "East Pipe"
	    _metrics (
		kernel.all.cpu.user 1000
		kernel.all.cpu.sys 1000
		kernel.all.cpu.idle 1000
	    )
	    _colorList cpu
	)
	_link 4 2 east "East link"
    )
)
.fi
.ft R
.in
.SH SEE ALSO
.BR pmview (1).