File: //opt/perf/man/man1/cpsh.1
.TH CPSH 1
\"
\" cpsh, the perfd performance shell -- Chris Bertin
\"
.SH NAME
cpsh \- cross-platform performance shell
.SH SYNOPSIS
.B cpsh
[options]
.SH DESCRIPTION
.PP
This program allows a performance expert to display \fIglance\fR metrics
from any system where the \fIperfd\fR daemon is running. If no options
(with exceptions mentioned below) are present, \fIcpsh\fR will run in
interactive mode, otherwise it will run in batch mode.
.PP
The options are:
.PP
.TP 8
.B \-c class
This option specifies the metric class (category) being requested. The
default class is \fBgbl\fR.
.TP
.B \-C subclass
This option must be used with the \fB-c\fR option above and specifies the
metric subclass (subcategory) being requested with that class.
See \fBEXAMPLES\fR below.
.TP
.B \-d\fR
This option causes the metric class tree and the full metrics dictionary
(all available metric classes and the metric names within the classes) to
be printed.
.TP
.B \-f filter
This option is used to specify a filter for a given metric class. A filter
has the form: \fB<metric> <operator> <value>\fR.
For text metrics, only \fBequal\fR (\fB==\fR) and \fBnot-equal\fR (\fB!=\fR)
are valid and the \fBvalue\fR can be an exact match or a regular
expression (see \fBfnmatch(3C)\fR and \fBregexp(5)\fR).
Extended regular expressions, so-called \fBcurly brace\fR patterns are
also supported for text filter values. The filter values should not be quoted.
Any quote provided is assumed to be part of the filter value itself. When
using lists inside of \fBcurly braces\fR, if any spaces are present, they
are also assumed to be part of the regular expressions.
See \fBEXAMPLES\fR below. Note also that filter expressions are validated
with \fBregcomp(3C)\fR on Unix systems.
.TP
.B \-F\fR
Print output in flat format instead of tabular format:
.sp
.nf
METRIC1: value
METRIC2: value
.fi
.sp
When displaying multi-instance classes, each instance is
separated by a marker.
If multiple intervals are requested, a separators indicates the iteration
number. See \fBEXAMPLES\fR below.
.TP
.B \-h header\fR
This option specifies the header type. The argument can be 0 (no header),
1 (two-line header) or 2 (two-line header with interval spacing).
The default is one.
See the \fB-s\fR and \fB-t\fR options also.
This option will not turn off interactive mode.
.TP
.B \-H\fR
This option causes \fIcpsh\fR to print the metric help text for the
specified metric(s) in the specified class and optional subclass, and then
exit. If no metric/class/subclass are specified, the default global metric
list is used. If a class and optional subclass
are specified, the default metric list for that class/subclass is
used (see \fBFILES\fR below). Options other than metric class(es)
and lists do not affect the output. These options, if present,
are validated but ignored.
.TP
.B \-i iterations\fR
This option specifies the number of iterations to be performed. The
default is one iteration. A zero iteration count can be used to
request an unlimited number of iterations.
.TP
.B \-I instance
This option is used together with the \fB-c\fR and \fB-C\fR options to
specify an instance when requesting data for a metric subclass.
See \fBEXAMPLES\fR below.
.TP
.B \-m metrics
This option specifies the list of metrics being displayed. If this option
is not present, the default list is taken from configuration files (see
.B FILES\fR below) or from the \fIperfd\fR server itself if no
configuration files are present. The list of metrics must be quoted or the
spaces and special characters escaped (with a backslash). Standard Unix
matching patterns may be specified (see \fBfnmatch(3C)\fR and
\fBregexp(5)\fR).
See \fBEXAMPLES\fR and \fBMETRIC LISTS\fR below as well.
.TP
.B \-n system\fR
This specifies which system to get performance data from. The system
name may be in the form \fBsystem:port\fR where \fBport\fR is the port
\fIperfd\fR is listening on. If \fBsystem\fR is an \fBIPv6\fR address
and if an alternate port is specified, the address
must be specified within brackets (for example, \fB[::1]:port\fR). If
a port is not specified, the brackets are optional.
This is one of the options that will not
cause \fIcpsh\fR to start in batch mode, i.e. it can be used to start an
interactive session on a remote system.
.TP
.B \-N\fR
This option is only meaningful when used with one of the summarization
options (see below). By default, when requesting summarized data, the
interval is aligned on the appropriate minute/second boundary. If this
option is specified the alignment won't be performed.
.TP
.B \-o optfile\fR
This option allows the user to specify an option file containing all the
options mentioned in this man page can be entered in an option file to
allow simpler preset batched runs. See \fBOPTION FILE\fR below.
.TP
.B \-r\fR
This option is used to request "raw" data. This only applies to a small
subset of metrics. See \fBRAW METRICS\fR below.
.TP
.B \-s\fR
This option allows the user to specify field separators. By default,
fields are horizontally separated by a space, vertically with spaces (if
a header type one or two is specified using the \fB-h\fR option above).
Special characters must be quoted or escaped (with a backslash). If the
argument is a comma, the output will be CSV (Comma-Separated Values)
with the metric names as headers (single-line headers). If CSV is
requested, \fB-h 2\fR is ignored. See \fBEXAMPLES\fR below.
.TP
.B \-t\fR
This option specifies that the output should be printed using a "fancy"
table format combining multi-line header and special separators. It is
equivalent to specifying a header type \fB2\fR and "\fB|+-\fR" field
separators (vertical separator is \fB|\fR, horizontal separator
is \fB\-\fR and cross line separator is \fB+\fR). This option will
not turn off interactive mode.
See \fBEXAMPLES\fR below.
.TP
.B \-T threshold\fR
This option specifies a global threshold above which data is displayed.
A threshold is essentially a global filter and is meant to be used for
batch mode to specify that, for example, no data should be pushed if
gbl_cpu_total_util is less than 25%. Thesholds apply only to main
classes. Attempting to set a threshold to a subclass will result in an
error.
See \fBEXAMPLES\fR below.
.TP
.B \-v\fR
Verbose mode. This option will cause \fIcpsh\fR to print the system type
and \fIperfd\fR server information when running in batch mode.
See \fBEXAMPLES\fR below.
.TP
.B \-W\fR
Normally, when running in batch mode, \fIcpsh\fR will strip trailing spaces.
If this option is present, spaces at the end of the lines won't be removed.
.TP
.B \-z summinterval\fR
This option specifies the summarization interval to be used when
displaying summarized data. By default, the maximum summarization
configured in the \fIperfd\fR server is used. The \fB-v\fR can be used to
obtain information about the server configuration. Note that
summarization is only available for global (single-instance) data.
.TP
.B \-Z summtype\fR
This option specifies the summarization type desired. The argument may be
one of \fBAVG\fR (average), \fBMIN\fR (minimum), \fBMAX\fR (maximum),
\fBSTDDEV\fR (standard deviation) or \fBALL\fR (all values). The
argument may be upper or lower-case (case is ignored).
.P
.B \-?\fR
Print option list and defaults.
.SH "OPTION FILE"
The list of options that can be specified in a \fIcpsh\fR option file is
as follows:
.P
.nf
class=<valid class string>
subclass=<valid subclass string>
filter=<valid filter string>
header=<valid numerical header value>
iterations=<valid numerical iterations value>
instance=<valid numerical instance value>
metrics=<valid metrics string>
system=<valid system string>
noalign=<true/false>
optfile=<valid optfile string>
raw=<true/false>
nostrip=<true/false>
separator=<valid separator string>
fancy=<true/false>
ipv4=<true/false>
verbose=<true/false>
summinterval=<valid numerical summinterval value>
summtype=<valid summtype string>
.fi
.P
This list will be printed if an invalid option is specified in
the option file and if the \fB-v\fR flag is present.
.SH FILES
Default metrics can be specified for each metric class. If a metric list
is not specified on the command line (or in the option file), \fIcpsh\fR
will attempt to find a default using the following search order:
.P
.nf
$HOME/.perfd/system/<system name>/<metric class>
$HOME/.perfd/os/<os type>/<metric class>
$HOME/.perfd/default/<metric class>
<CONFIGDIR>/perfd/os/<os type>/<metric class>
<CONFIGDIR>/perfd/default/<metric class>
.fi
.P
On HPUX, Linux, Solaris and AIX, the default configuration directory
(<CONFIGDIR> above) is
\fB/var/opt/perf\fR.
.P
<system name> is the name of the system, <os type> is the OS type as
returned by \fIglance\fR in the metric \fBGBL_OSNAME\fR (currently one of
.B AIX\fR,
.B HP-UX\fR,
.B Linux\fR,
.B NT\fR or
.B SunOS\fR).
.P
To obtain a list of valid metric classes on a given system, the following
command can be run:
.P
$ \fBcpsh -d -n system-name | grep -w class
.SH "METRIC LISTS"
The \fBperfd\fR server allows clients to combine metrics when
appropriate: global (gbl) and table (tbl) metrics may be added to any
metric list, and parent class metrics may be added to subclass metrics.
In order to add metrics from a different class, the appropriate metric prefix
must be used. For example, the following command:
.P
.nf
$ \fBcpsh -c app -C proc -I 3 -m 'gbl*name app*util proc_proc_id proc*name'\fR
.fi
.P
will print the global node and OS name metrics, all application-level
utilizations for application index number 3, then process IDs and
all the process-level 'name' metrics
for each process that is currently alive in application number 3.
And the following command:
.P
.nf
$ \fBcpsh -n itill -c app -C proc -I 3 -m "gbl_stattime app_name \\
proc_proc_id proc_proc_name proc_cpu_total_util"\fR
.fi
.P
will print the time, the application name for application index number 3,
then the process IDs, names, and cpu utilizations for all processes
currently alive in application number 3.
.P
Note also that the metric lists for base classes and subclasses are
different. For instance, the list of process metrics is different for a
full process list (such as in the 'proc' command) and a process list for
an application (such as in the 'app 1 proc' command). The same
configuration file is used in both cases, and unavailable metrics are
silently ignored. For example, specifying the following list
in $HOME/.perfd/default/proc:
.P
\fBproc*name proc_proc_id app*util\fR
.P
will cause the 'proc' command to display all process names
and the process
ID, but the 'app 1 proc' command will additionally display the application's
utilization metrics. When running in interactive mode, modifying a class
metric list does not affect the subclass, and
modifying a subclass metric list does not affect the class metric list.
.SH "RAW METRICS"
By default, all metrics are displayed in the same format as in
\fIglance\fR: time stamps show date/time, rates can show Kb, Mb, etc... If
the \fB-r\fR option is specified, some metrics, like the ones just
mentioned, will be displayed in raw
format. Interpreting raw data requires knowledge about the metric types
and is not recommended for general use.
.SH EXAMPLES
The following are examples of batch mode invocations.
.P
Print all global metrics whose names match the pattern:
.P
$ \fBcpsh -c gbl -m "gbl_nodename *cpu*util" -n test123\fR
.P
.nf
Node CPU Idle Intrpt Nice Phys System User Wait
Name Entl % CPU % CPU % CPU % CPU % CPU % CPU % CPU % CPU %
test123 4.8 95.4 0.2 0.0 4.8 2.2 4.8 2.6 0.0
.fi
.P
Print open files for \fBinit\fR process on system test123:
.P
$ \fBcpsh -n test123 -c proc -C pfile -I 1\fR
.P
.nf
Open File File
PID Mode Type Name
1 rd/wr fifo /dev/initctl
.fi
.P
Print processes that used more than .2 seconds in the last interval:
.P
$ \fBcpsh -c proc -f "proc_cpu_total_time > 0.2"\fR
.P
.nf
User App Process Process
Name PID ID TTY Start Time CPU % Name
root 35 30 01/22/08 13:23:52 0.8 vxfsd
root 8421 3 02/07/08 12:45:27 0.4 perfd
.fi
.P
Print processes running under this user name on system test123
.P
$ \fBcpsh -n test123 -c proc -f "proc_user_name == chrisb"\fR
.P
.nf
User App Process Process
Name PID ID TTY Start Time CPU % Name
chrisb 30935 2 01/03/08 11:12:46 0.0 xterm
chrisb 30937 2 pts/0 01/03/08 11:12:47 0.0 ksh
.fi
.P
Print default global metrics on current system in "fancy" table format:
.P
$ \fBcpsh -c gbl -t\fR
.P
.nf
+----------------+--------+--------+------+------+------+------+------+
|Node | Time| CSwitch| | Load| Peak|Pg Req| |
|Name | Stamp| Rate| CPU %| Avg|Disk %| Rate|Swap %|
+----------------+--------+--------+------+------+------+------+------+
|hpcb |09:18:15| 260.7| 5.3| 0.0| 0.9| 30.1| 40.0|
+----------------+--------+--------+------+------+------+------+------+
.fi
.P
Print CPU utilization metrics in a table where all separators are
asterisks.
.P
$ \fBcpsh -c gbl -m "gbl_nodename *cpu*util" -n test123 -s "***" -h2\fR
.P
.nf
********************************************************************
*Node * Idle*Intrpt* Nice* Phys *System* * User* Wait*
*Name * CPU %* CPU %* CPU %* CPU %* CPU %* CPU %* CPU %* CPU %*
********************************************************************
*test123 * 98.0* 0.0* 0.0* 1.7* 0.7* 1.7* 0.9* 0.0*
********************************************************************
.fi
.P
Print two iterations of the default global metrics on system test124 and
print the system/server information first:
.P
$ \fBcpsh -i2 -v -c gbl -n test124\fR
.P
.nf
test124 - 2-way sun4u 64-bit SunOS 5.10, up 58 days 23:20
test124 - full-weight, 5s interval (300s max summarization), up 7 days 17:22
Time OS Active Run Memory Pg Out Peak
Stamp Int Name Proc CPU % Queue % Rate Swap % Disk %
09:29:15 5.0 SunOS 7.9 2.4 0.0 83.0 0.0 34.0 0.2
09:29:20 5.0 SunOS 7.0 7.2 0.0 83.0 0.2 34.0 1.2
.fi
.P
Print 3 intervals of the system name and the CPU utilization on system
ovrsund2 in CSV format:
.P
$ \fBcpsh -s, -i3 -m "gbl_nodename *cpu*util" -n ovrsund2\fR
.P
.nf
GBL_NODENAME,GBL_CPU_IDLE_UTIL,GBL_CPU_SYS_MODE_UTIL,GBL_CPU_TOTAL_UTIL,GBL_CPU_USER_MODE_UTIL,GBL_CPU_WAIT_UTIL
ovrsund2,89.7,5.8,10.2,4.4,0.0
ovrsund2,94.2,1.4,5.8,4.4,0.0
ovrsund2,98.4,1.0,1.6,0.6,0.0
.fi
.P
Print default global metrics in flat format:
.P
.nf
$ \fBcpsh -F -c gbl\fR
GBL_NODENAME: hpcb5
GBL_STATTIME: 06:22:55
GBL_INTERVAL: 5.2
GBL_CSWITCH_RATE: 1101
GBL_CPU_TOTAL_UTIL: 2.2
GBL_LOADAVG: 0.0
GBL_DISK_UTIL_PEAK: 1.1
GBL_MEM_PAGE_REQUEST_RATE: 7.3
.fi
.P
Print same metrics in same format but with average summarization:
.P
.nf
$ \fBcpsh -F -Z avg -c gbl\fR
AVG-GBL_NODENAME: hpcb5
AVG-GBL_STATTIME: 06:28:20
AVG-GBL_INTERVAL: 5.0
AVG-GBL_CSWITCH_RATE: 584.3
AVG-GBL_CPU_TOTAL_UTIL: 2.2
AVG-GBL_LOADAVG: 0.0
AVG-GBL_DISK_UTIL_PEAK: 1.6
AVG-GBL_MEM_PAGE_REQUEST_RATE: 119.1
.fi
.P
Multi-instance multi-interval output:
.P
$ \fBcpsh -F -c fs -i 2\fR
.nf
=== Iteration 1
INDEX: 0
FS_SPACE_USED: 56.9gb
FS_SPACE_UTIL: 91.4
FS_MAX_INODES: 17775648
FS_INODE_UTIL: 4.2
FS_DIRNAME: /
===
INDEX: 1
FS_SPACE_USED: 27mb
FS_SPACE_UTIL: 37.5
FS_MAX_INODES: 20080
FS_INODE_UTIL: 0.2
FS_DIRNAME: /boot
=== Iteration 2
INDEX: 0
FS_SPACE_USED: 56.9gb
FS_SPACE_UTIL: 91.4
FS_MAX_INODES: 17775648
FS_INODE_UTIL: 4.2
FS_DIRNAME: /
===
INDEX: 1
FS_SPACE_USED: 27mb
FS_SPACE_UTIL: 37.5
FS_MAX_INODES: 20080
FS_INODE_UTIL: 0.2
FS_DIRNAME: /boot
.fi
.P
Show processes consuming any CPU time but only when the global CPU
utilization is greater than 25%:
.P
$ \fBcpsh -i 0 -c proc -f 'proc_cpu_total_util > 0' -T 'gbl_cpu_total_util > 25' -m 'gbl_stattime gbl_cpu_total_util proc_proc_id proc_cpu_total_util proc_proc_cmd'\fR
.nf
Time Process
Stamp CPU % PID CPU % Command Line
08:29:50 50.6 13154 99.5 /bin/sh /home/ptc-nfs/chrisb/bin/spin
08:29:50 50.6 20359 0.2 ./perfd -f -D1 -i5
08:29:55 46.2 13154 90.6 /bin/sh /home/ptc-nfs/chrisb/bin/spin
08:29:55 46.2 20359 0.1 ./perfd -f -D1 -i5
08:30:20 50.6 13159 99.3 /bin/sh /home/ptc-nfs/chrisb/bin/spin
08:30:20 50.6 20359 0.2 ./perfd -f -D1 -i5
.fi
.P
Note that no data was shown between 8:30:00 and 8:30:15 because the
global CPU utilization was less than the threshold.
.P
Print and format help text for all GBL_LOADAVG metrics:
.P
$ \fBcpsh -H -m gbl_loadavg\\* | fmt\fR
.nf
=== GBL_LOADAVG:
The 1 minute load average of the system obtained at the time of logging.
On windows this is the load average of the system over the interval.
Load average on windows is the average number of threads that have been
waiting in ready state during the interval. This is obtained by checking
the number of threads in ready state every sub proc interval,
accumulating them over the interval and averaging over the interval.
=== GBL_LOADAVG15:
The 15 minute load average of the system obtained at the time of
logging.
=== GBL_LOADAVG5:
The 5 minute load average of the system obtained at the time of logging.
.fi
.SH "INTERACTIVE MODE"
If no arguments are present (except for the exceptions noted above), \fIcpsh\fR
will run in interactive mode. In that mode, the user can connect to any
system where \fIperfd\fR is running and request metrics from that system.
Entering a question mark and a carriage return will print a list of the
available commands as well as a few examples.
.P
Note that all interactive commands may be piped through any Unix command
(for instance, \fBmore\fR, \fBgrep\fR, etc...).
.P
The main commands are:
.P
.TP 8
.B system [name]
Without argument this command displays information about the current
system. If an argument is provided, it is the name of a system (see the
\fB-n\fR option above) that \fIcpsh\fR will attempt to connect to or switch
to if a connection has already been established. Note that just entering
the system name will switch to an already active system as well.
.P
Note that any given system can be connected to in multiple ways, using
its simple name, its fully qualified name, its IP address, the loopback,
etc... \fIcpsh\fR will attempt to create a single connection for a unique
\fBsystem:port\fR combination. If an alternate name is provided, that
name will be shown in parenthesis. For example, if \fBhpcb\fR was first
used, then \fBlocalhost\fR, the \fIsystems\fR command would show:
.P
.nf
*hpcb (localhost) - 1-way 9000/800 64-bit HP-UX B.11.11, up 29 days 07:04
.fi
.P
Only one alternate name (the last one used) is shown.
.TP
.B systems
This command takes no arguments. It will print a list of the systems
\fIcpsh\fR is currently connected to with an asterisk to the left of the
system currently active.
.TP
.B server\fR
This command is similar to the \fBsystem\fR above but it will print
configuration information for the \fIperfd\fR server instead of system
information.
.TP
.B servers\fR
Also similar to \fBsystems\fR but will print information about
the \fIperfd\fR servers.
.TP
.B class [metric class] [metric subclass]
Without argument, this command prints the current metric class. If
valid class/subclass names are provided as argument, \fIcpsh\fR will
switch to that class/subclass.
.TP
.B classes
This command takes no arguments. It will display the full list of classes
and subclasses available from the \fIperfd\fR server currently active.
For more details about the classes, refer to the \fBmdict\fR command
below.
.TP
.B <metric class> [instance ID] [<metric subclass>]\fR
Entering any base metric class (for instance, \fBgbl\fR or \fBbydsk\fR
or \fBproc\fR)
will display the values for the list of chosen (or default) metrics.
If the metric class is multi-instance (like \fBbydsk\fR
or \fBproc\fR), data for all the
instances will be displayed.
.br
If the class is multi-instance, an optional \fBinstance ID\fR may be
provided and, in this case, only data for the specified instance is
printed. For instance, \fBproc 1\fR will print data for process 1 only.
It will also select instance 1 as the default instance.
.br
If a metric subclass is specified, the data for that subclass will be
printed. For instance, \fBproc 1 pfile\fR will print the open files for
process 1. If an instance has been established as the default,
the instance ID can be skipped in further requests. So, after entering
\fBproc 1\fR, \fBproc byregion\fR will print the memory regions for
process 1.
.TP
.B init, add, del[ete]\fR
These commands initialize, add to or delete from the metric list for the
selected class and the selected system. The arguments are a list of
metric names or matching patterns (see the \fB-m\fR option above). The
modified metric list is preserved until \fIcpsh\fR is exited.
.TP
.B list [all]\fR
This command prints a list of the metrics currently selected. If the
optional \fBall\fR argument is provided, all the available metrics for
the current class are printed.
.TP
.B push\fR
Once a system, metric class and metric list are all established, this
command will instruct \fIcpsh\fR to print new metric values as soon as
they become available in \fIperfd\fR. The push process may be
interrupted using the configured interrupt key (typically control-C).
.TP
.B help\fR [<metric name>]
If no arguments are present, this command is equivalent to the \fB?\fR
command and prints a summary of the commands and some examples. If an
argument is present, it is expected to be a metric name in the current
metric class or in the global class and, if so, \fIcpsh\fR will
print the help text associated
with the metric. Note that \fIperfd\fR servers can only provide help text
for the metrics that are enabled in the server.
.TP
.B mdict\fR
Print the entire metric dictionary. Similar to the batched \fBcpsh -d\fR
command.
.TP
.B filter [<filter value> or "disable"]\fR
Without argument, this command will print the current filter for the
current metric class on the current system. If the argument is the
keyword \fBdisable\fR, the current filter is disabled, otherwise, the
arguments should be a valid filter expression (see \fB-f\fR option and
refer to the \fBEXAMPLES\fR above).
.TP
.B summ [seconds]\fR
If the current metric class supports summarization, this command will
print the summarized data for the established metric set. If an
additional argument is present, it is a number of seconds to be used
instead of the default summarization configured in the \fIperfd\fR
server (See the \fBserver\fR command above). If a non-numeric
\'\fBseconds\fR\' argument is provided, it is silently ignored.
.TP
.B wait\fR
This command will cause \fIcpsh\fR to pause until new data is available
from the currently selected \fIperfd\fR server.
.TP
.B . filename\fR
The \fBdot\fR command is similar to the Unix shell and will cause
\fIcpsh\fR to read the next commands from the file specified as argument.
Also similarly to the shell (\fIbash\fR or \fIksh\fR), the
tilde (\fB~\fR) specifies the user's home directory.
.TP
.B exit
This command will cause \fIcpsh\fR to exit. Typing \fRquit\fR, \fRq\fR or
entering the end of file character (typically control-D) will cause
\fIcpsh\fR to terminate as well.
.TP
.B \fB?\fR
Print a summary of the commands and some examples.
.SH "INTERACTIVE SESSION EXAMPLE"
The following is an example of an interactive session:
.P
$ \fBcpsh -n hpcb\fR
.br
.nf
> systems
*hpcb - 1-way 9000/800 64-bit HP-UX B.11.11, up 28 days 09:23
> system ros80975ber
> systems
*hpcb - 1-way 9000/800 64-bit HP-UX B.11.11, up 28 days 09:23
ros80975ber - 2-way 80F86 32-bit (assumed) NT 5.1, up 27 days 04:37
> server
hpcb - full-weight, 5s interval (300s max summarization), up 3 days 07:27
> servers
*hpcb - full-weight, port 5227, 5s interval (300s max summarization), up 3 days 07:27
ros80975ber - full-weight, port 5227, 5s interval (300s max summarization), up 05:37
> class
Current class: <none>
> class proc
> help PROC_USER_NAME
THREAD_USER_NAME
On Unix systems, this is the login
account of a process (from
/etc/passwd). If more than one
account is listed in /etc/passwd
with the same user ID (uid) field,
the first one is used. If an
account cannot be found that matches
the uid field, then the uid number
is returned. This would occur if
the account was removed after a
process was started.
On Windows, this is the process
owner account name, without the
domain name this account resides in.
On HP-UX, this metric is specific to
a process. If this metric is
reported for a kernel thread, the
value for its associated process is
given.
> mdict | head
Metrics available on hpcb
1) Class tree
data source 0: nums
15 available classes in nums
0 subclasses in bycpu
1 subclass in app (Selector: APP_NUM)
app[0]: proc
3 subclasses in proc (Selector: PROC_PROC_ID)
proc[0]: pfile
0 subclasses in pfile
> gbl
Node Time CSwitch Load Peak Pg Req
Name Stamp Rate CPU % Avg Disk % Rate Swap %
hpcb 15:36:30 321.3 8.0 0.1 1.9 110.9 38.0
> list
GBL_NODENAME
GBL_STATTIME
GBL_CSWITCH_RATE
GBL_CPU_TOTAL_UTIL
GBL_LOADAVG
GBL_DISK_UTIL_PEAK
GBL_MEM_PAGE_REQUEST_RATE
GBL_SWAP_SPACE_UTIL
> bynetif
Interface In Pkt Out Pkt In Out
Index Name Rate Rate KB Rate KB Rate
0 lan0 66.9 75.7 5.7 19.2
1 lo0 na na na na
> app 3
App App Alive Active Res
Num Name Proc Proc Mem % CPU %
3 Perftools 6.0 2.0 2.6 1.6
> app proc
User Process CPU Process
Name PID TTY Start Time % Cum Name
root 1911 12/18/07 06:14:11 0.0 ttd
root 1931 12/18/07 06:14:13 0.0 midaemon
root 1940 12/18/07 06:14:15 0.0 scopeux
root 1969 12/18/07 06:14:22 0.0 perfalarm
root 2091 12/18/07 06:14:25 1.1 coda
root 22949 01/12/08 08:03:58 0.5 perfd
> class
Current class: app/proc
> proc 22949 pfile
Open File File File
PID Mode Type Offset Name
22949 read chr 0 /dev/null
22949 write reg 0 <reg,vxfs,/var,/dev/vg00/lvol8,inode:3146>
22949 write reg 229979 <reg,vxfs,/var,/dev/vg00/lvol8,inode:3146>
22949 write reg 116509 <reg,vxfs,/var,/dev/vg00/lvol8,inode:17315>
22949 read reg 7820 <reg,vxfs,/var,/dev/vg00/lvol8,inode:17712>
22949 rd/wr socket 0 unix /var/spool/sockets/pwgr/client8421
22949 read chr 0 /dev/config
22949 rd/wr streams 0 /dev/udp
22949 rd/wr socket 0 inet,tcp
22949 rd/wr socket 0 inet,tcp
22949 rd/wr socket 0 inet,tcp
22949 rd/wr socket 0 inet,tcp
22949 rd/wr socket 0 inet,tcp
> filter proc_user_name != root
> proc
User App Process Process
Name PID ID TTY Start Time CPU % Name
lp 1790 31 12/18/07 06:14:06 0.0 lpsched
chrisb 1301 23 12/18/07 06:13:43 0.0 xterm
chrisb 1302 23 pty/ttysb 12/18/07 06:13:43 0.0 sh
chrisb 18511 23 pty/ttys7 01/15/08 15:34:43 0.0 sh
chrisb 18556 23 pty/ttys7 01/15/08 15:36:01 0.4 cpsh
www 2611 25 12/18/07 06:15:17 0.0 httpd
chrisb 3299 23 12/18/07 06:19:39 0.0 xterm
chrisb 3300 23 pty/ttysa 12/18/07 06:19:39 0.0 sh
chrisb 4420 23 12/18/07 06:22:34 0.0 xterm
chrisb 4421 23 pty/ttys7 12/18/07 06:22:34 0.0 sh
chrisb 17272 23 pty/ttysa 01/15/08 13:30:33 0.0 mpadv
chrisb 23611 23 pty/ttys7 01/12/08 10:28:15 0.0 eclipse
chrisb 23612 22 pty/ttys7 01/12/08 10:28:16 0.0 java
> filter proc_proc_id == 1
> filter
proc_proc_id == 1
> proc
User App Process Process
Name PID ID TTY Start Time CPU % Name
root 1 30 12/18/07 06:12:42 0.0 init
> filter disable
> filter
<no filter>
> class app
> filter app_name == {system,test*}
>
App App Alive Active Res
Num Name Proc Proc Mem % CPU %
0 system 125.0 4.0 19.3 0.5
11111 test2 1.0 0.0 0.0 0.0
123 test1 1.0 0.0 0.0 0.0
> wait
> proc | grep cpsh
chrisb 18556 23 pty/ttys7 01/15/08 15:36:01 0.4 cpsh
> class gbl
> init gbl_cpu_total_util gbl_run_queue and gbl_mem_pageout_rate
> summ
5-minute summarization:
Run Pg Out
SUMM CPU % Queue Rate
AVG 7.3 0.1 501.0
MIN 0.3 0.0 0.0
MAX 18.2 0.3 5350.0
STDD 2.9 0.1 1363.9
> system itania
> fs
Space Max FS
Index Used Space% Inodes Inode% Directory
0 520mb 25.3 51840 5.5 /
1 200mb 11.4 51040 0.3 /stand
2 1.3gb 20.9 190048 13.2 /var
3 2.7gb 33.7 214368 18.8 /usr
4 616mb 30.3 45888 0.3 /tmp
5 4.1gb 51.7 181568 30.0 /opt
6 146.5gb 76.1 12808800 0.0 /hpvm
7 8mb 34.9 512 4.2 /home
8 2.2gb 11.8 4545180 0.0 /dougg
9 392.1gb 46.9 17059008 11.8 /home/ptc-nfs
10 499.8gb 59.8 11601920 4.2 /local_mnt/dist
> bydsk
Disk Phys Req Device
ID IO Rt Queue Disk % Name
0 6.1 0.0 2.4 0/0/0/3/0.6.0
1 0.1 0.0 0.1 1/0/0/3/0.6.0
2 9.0 3.2 4.5 0/0/0/3/0.5.0
3 0.0 0.0 0.0 1/0/1/1/0/1/1.6.0
> bycpu
CPU CPU CPU Clk Total System User Total Intr
ID State MHz CPU % CPU % CPU % CPU % Rate
4 Enable 1500 7.3 7.3 0.0 7.3 na
1 Enable 1500 6.0 5.7 0.2 6.0 na
7 Enable 1500 0.8 0.6 0.2 0.8 na
0 Enable 1500 6.4 6.2 0.2 6.4 na
6 Enable 1500 6.6 5.3 1.3 6.6 na
5 Enable 1500 6.2 6.2 0.0 6.2 na
2 Enable 1500 11.5 11.3 0.2 11.5 na
3 Enable 1500 12.4 12.2 0.2 12.4 na
> exit
.fi
.P
.SH "SEE ALSO"
.PP
\fBglance\fR(1), \fBxglance\fR(1), \fBpadv\fR(1),
\fBmpadv\fR(1), \fBperfd\fR(1M), \fBksh(1)\fR.