Collect operates with a large number of options.
The following option descriptions will help you
understand the full capability of Collect.
–(dash)
|
Directs the output
from the Collect utility to stdout,
which is usually the screen or window from
which the Collect command was entered. This
is the default behavior if no data collection
file is specified using the -f option.
|
–a
|
Simultaneously
displays Collect data on the screen (stdout)
while also recording the data in a file when
the -f option is specified.
|
–C [start_time],
[end_time]
|
Extracts a series
of samples from a file according to the specified
start time and end time for the series. The
format of the time string is:
[+]Year:Month:Day:Hour:Minute:Second
For example: +2010:11:18:23:30:00.
Every time string field except the Second
field is optional.
The optional plus (+) sign at the beginning
of the time string indicates that time
is relative to the beginning of the data
collection period. If + is not specified,
the -C option indicates absolute
time. When time string fields are absent
and absolute format is specified, the values
from the beginning of collection are used.
If start_time is omitted, the
start of the collection period is used.
If end_time is omitted, the end
of the collection period is used.
|
–d
|
Prints debug information
to stdout.
|
–D device1,
[device2, ...deviceN]
|
Specifies which
disks are included for data collection, using
the device special filename of the disks, such
as dsk3 for SCSI disk number
3. You can obtain a list of disk devices from
the device directories under /dev,
such as /dev/disk or /dev/tape.
The hwmgr command can also be
used to find devices. See the hwmgr(8)
reference page for information on the command
options.
You can also use
regular expressions
to specify a group
of disks. For example dsk* selects
all disks. For information
on regular expressions,
refer to the grep(1)
reference page or
the Programming Support
Tools guide.
|
–e pmdtlncfyh
|
Excludes the specified
subsystems from the data collection and playback.
Do not enter a space between letters when specifying
options. For example, the following command
specifies that only the CPU and file system
data are excluded:
# collect -e cf
The option letters map to the following
subsystems:
p –proc
Specifies that the Process Statistics (RSS and VSZ
in megabytes) are excluded from data collection.
When included, this data appears similar to the
following in the output from the collect command:
|
PID |
User |
%CPU |
RSS |
VSZ |
UsrTim |
SysTim |
IBk |
OBk |
Maj |
Min |
Command |
0 |
root |
2.1 |
12M |
342M |
0.00 |
0.01 |
0 |
0 |
0 |
0 |
kern idle |
| . |
| . |
| . |
|
| |
m –mem
Specifies that the MEMORY STATISTICS are excluded from
data collection. When included, this data appears
similar to the following in the output from the collect command:
# MEMORY STATISTICS=
|
(<-------- MegaBytes
-------->) |
(<-------- Pages/sec
-------->) |
Free |
Swap |
Act |
InAc |
Wire |
UBC |
PI |
PO |
Zer |
Re |
COW |
SW |
HIT |
PP |
ALL |
135 |
1 |
44 |
22 |
40 |
36 |
0 |
0 |
7 |
0 |
0 |
0 |
0 |
0 |
0 |
|
| |
d –disk
Specifies that the DISK Statistics are excluded from
data collection. When included, this data appears similar
to the following in the output from the collect command:
|
DISK Statistics |
DSK |
NAME |
B/T/L |
R/S |
RKB/S |
W/S |
WKB/S |
AVS |
AVW |
ACTQ |
WTQ |
%BSY |
0 |
dsk0 |
0/0/0 |
53 |
431 |
0 |
5 |
8.49 |
0.00 |
0.46 |
0.00 |
43.09 |
|
| |
t –tape
Specifies that tape device data is excluded from data
collection.
l –LSM volume
Specifies that LSM volume data is excluded from data
collection. When included, this data appears similar
to the following in the output from the collect command
(Collect displays one volume at a time):
|
# LSM Volume Statistics |
#VOL |
NAME |
R/S |
RKB/S |
RAVS |
W/S |
WKB/S |
WAVS |
1 |
rootvol |
0 |
0 |
0.00 |
0 |
12 |
45.62 |
|
| |
n –net
Specifies that the Network Statistics are excluded
from data collection. When included, this data appears
as follows in the output from the collect command:
|
# Network Statistics |
#Cnt |
Name |
Inpck |
InErr |
Outpck |
OutErr |
Coll |
IKB |
OKB |
%BW |
2 |
tu0 |
89 |
0 |
2 |
0 |
0 |
10 |
0 |
0 |
|
| |
c –CPU
Specifies that the CPU SUMMARY and CPU STATISTICS are
excluded from data collection. When included, this
data appears as follows in the output from the collect command:
|
CPU SUMMARY |
USER |
SYS |
IDLE |
WAIT |
INTR |
SYSC |
CS |
RUNQ |
AVG5 |
AVG30 |
AVG60 |
FORK |
VFORK |
13 |
16 |
71 |
0 |
149 |
492 |
725 |
0 |
0.13 |
0.05 |
0.01 |
0.30 |
0.00 |
SINGLE CPU STATISTICS |
CPU |
USER |
SYS |
IDLE |
WAIT |
0 |
13 |
16 |
71 |
0 |
|
| |
f –file system
Specifies that the FileSystem Statistics are excluded
from data collection. When included, this data appears
as follows in the output from the collect command:
|
# FileSystem Statistics |
# FS |
Filesystem |
Capacity |
Free |
0 |
root_domain#root |
128 |
30 |
1 |
/proc |
0 |
0 |
2 |
usr_domain#usr |
700 |
147 |
3 |
usr_domain#var |
700 |
147 |
|
| |
y –tty
Specifies that the TTY Statistics are excluded from
data collection. When included, this data appears as
follows in the output from the collect command:
|
# TTY Statistics |
# |
In |
Out |
Can |
Raw |
|
3 |
1489 |
0 |
3 |
|
| |
h –header
Specifies that the RECORD N headers are excluded from
data collection. When included, this data appears as
follows in the output from the collect command:
# RECORD 1 (943046665:0)
(Fri Nov 30 16:24:25 2000) ##
See also the -s option,
which you use to specify subsystems
that must be included in data collection.
|
–f
|
Records data in
the specified file. The argument is a path
name to a file such as /usr/users/collectdata/nov13.
By default, the Collect utility creates a compressed
file and appends a .cgz extension
to the file name that you specify. For example,
the file nov13 will be created
as nov13.cgz by Collect. See
the -o option if you want to
create an uncompressed file.
As the file created
is in binary format,
you must use the
Collect utility's -p option
to replay the contents
of the file.
See also the -a option,
which enables you
to simultaneously
direct the output
from the Collect
utility to stdout (usually
the terminal from
which the Collect
utility is invoked).
You can also specify
other data collection
options with the -f option,
such as -s or -n,
to control what information
is recorded in the
file.
|
–F
|
Display or record
full process information process lines, which
are longer than 80 columns. The process priorities
are shown and the RSS and VSZ values are in
kilobytes rather than formatted to fit into
four columns. The following is example output,
except that here the column widths have been
manually adjusted to show the example output:
|
## RECORD 1 (943048211:40)
(Fri Nov 1 16:50:11 1999) ## |
| |
| Process Statistics (RSS & VSZ
in KBytes) |
PID |
PPID |
User |
%CPU |
RSS |
VSZ |
UsrTim |
SysTim |
Pri |
IBk |
OBk |
Maj |
Min |
Command |
0 |
root |
2.4 |
1984 |
3744 |
0.00 |
0.02 |
0 |
0 |
0 |
0 |
0 |
0 |
kern idle |
1 |
0 |
root |
0.0 |
96 |
480 |
0.00 |
0.00 |
44 |
0 |
0 |
0 |
0 |
init |
| . |
| . |
| . |
|
| |
Compare the preceding
output to the example output for Process Statistics
shown in the entry for the -e option.
|
–h
|
Display a usage
summary (help) for the collect command
line options.
|
–H h d w
m time
[,how_long]
|
Runs the Collect
utility in historical mode. The how_long argument
defines the length of time that the logs are
preserved. The how_long argument is
optional, and if you do not specify it the
log preservation default is one week. The following
values for time can be specified for each argument:
h &nd
hourly at [0-59]
minutes
An hourly rollover at the specified minute.
A value of -Hh3 will roll over the
Collect log every hour at three minutes past the
hour. For example: 0.03, 1:03, 2:03, and 3:03.
d –daily
at [00:00-23:59]
hours and minutes
A daily roll-over at the specified hour and minute
in 24-hour time format.
For example, a
value of -Hd14:2 will
roll over the Collect
log every day at
system time 14:02
(2:02 PM).
w –weekly
at [0-6@00:00-23:59]
days, hours, and
minutes
A weekly roll-over at the specified day, hour and
minute in seven-day 24-hour time format. A value
of Zero in the day field represents Sunday.
For example, a
value of -Hw1@10:25 will
roll over the Collect
log every Monday
at 10:25 AM.
m –monthly
at [1-31@00:00-23:59]
date, hours, and
minutes
A monthly roll-over at the specified date, hour and
minute in 31-day, 24–hour time format.
For example, a
value of -Hm3@21:15 will
roll over the Collect
log every third day
of the month at 21:15
(9:15 PM).
As for the value
of time, you can
specify day and week
values for how_long.
For example, -Hd14:12,2d5w will
roll over the log
every day at 14:12
(2:15 PM) and keep
the log for 2 days
and 5 weeks.
|
–i I:[PI]
|
Specifies a time
value for the interval (I) and, optionally,
the process interval (PI) in seconds. This
enables you to control the rate at which data
is collected from subsystems. Floating-point
values are permitted.
When you use this option, the initialization
message echoed by the Collect utility is
updated to confirm the value of I, as follows:
# collect -i 2:8
Initializing (2.0 seconds) (float OK)
#collect -i 5:12
PROC_INTERVAL must be
evenly divisible by INTERVAL
Note that in the second command, an error
message is displayed as the value of PI must
always be evenly divisible by the value
of I.
|
–l
|
Seek to last valid
record and print it. This is primarily used
by the graphical interface to get the ending
time of the collection period.
|
–L vol1//vol01
|
Collects data
from one disk group listed in /dev/vol.
|
–M
|
Monitors free
disk space. Collect suspends writing to disk
when free disk space rises above a declared
threshold, and resumes when free space rises
above the threshold. The format is as follows:
-M [suspend_value,resume_value]
In the following example, Collect suspends
disk writes when free disk space falls
below 250 MB, and resumes writing when
free disk space rises above 300 MB:
# collect -M 250,300
|
–nNum
|
Select only top
Num processes, where Num is an integer.
This option is useful with the -S sorting
option.
|
–o [tmfnzlq]
|
Options that enable
you to control the data collection procedure:
–t (time)
Shows absolute system and user time (T in data recorded
for the process subsystem, the way the ps command
does. The default is to show a one-second normalized
delta since the last sample, thus making graphs
of these time values more useful.
–m (memory)
Shows 8192 byte pages instead of megabytes (MB) for
absolute memory values.
–f (force)
Do not prompt before overwriting an existing output
file.
–n (nice)
Do not allow the Collect utility to set high scheduling
priority for itself using nice.
–z (zipped)
Do not write a compressed (zipped) output file.
–l (lock)
Prevents the Collect utility from locking its pages
into memory.
–q (queue)
Causes the Collect utility to use instantaneously
measured queue lengths, instead of calculated averages.
|
–p collect_datafile
[–f output_datafile]
|
When the existing collect_datafile is
specified alone, the Collect utility will play
back the contents of the file to stdout (usually
the terminal window from which the collect command
was entered). You use options such as -e to
filter the data read from the collect_datafile.
As the file contents will be large, you may
want to pipe the output to the more command
or use the grep command to search
for specific data items.
To convert data
files created using
previous versions
of Collect, use the -f option
to specify an output_datafile.
|
–P pid1 ... |
[[ Ppid1... ]|
[Ccommand1 ... ]|
[Uuser/UID1 ... ]]
|
The following
process identifiers can be specified:
pid [pid,...pid]
Collect data only for processes in list. Specify
% to include the process for the collect command.
Ppid [pid,...pid]
Collect data only for processes whose parent PID
(PPID) is specified, or that are members of a process
group (PGID) with the same ID.
Ccommand [command,...command]
Collect data only for processes whose process names
contain above string. This can be a partial string,
but must match exactly. Regular expressions are
not allowed.
Uuser/UID[user/UID,...user/UID]
Collect data only for processes owned by the specified
users. User identifiers (UIDs) can be used in place
of the user name. See the /etc/passwd file
for a list of user account names and associated
UIDs.
|
–R
|
Specify the duration
of data collection. Either of the following
formats can be specified:
|
| |
Num Unit [
Num Unit [ ...] ]
Where Num is an integer and Unit is
one of: |
| |
w – weeks, such as 4w for four weeks. |
| |
d – days, such as 2d for two days. |
| |
h – hours, such as 12h for twelve
hours. |
| |
m – minutes, such as 30m for thirty
minutes. |
| |
s – seconds, such as 45s for 45 seconds. |
| |
Any valid combination of times can
be entered, such as 4w2d6h45m20s. |
| [+]Year:Mon:Day:Hour:Min:Sec |
| |
The same time format described for
the -C option, except that
a plus (+) sign indicates the value is
relative to the current time. Without
a +, the value is an absolute time at
which the data collection period should
end.
|
|
–s [pmdtlncfyh]
|
Include the specified
subsystems in data collection and play-back,
which can be: Proc, Mem, Disk, Tape, Lsm, Net,
Cpu, Filesys, mQueue, ttY, and Header. The
option letters (p m d...) map to these subsystems
and are described under the entry for the -e option.
Do not enter a
space between letters
when specifying options.
For example, the
following command
specifies that only
the CPU and file
system data are included:
# collect
-s cf
Note that if you
specify a subsystem
that is not available
on the local system,
only a RECORD N header
will be displayed.
The following example
shows what happens
when t (tape) is
specified, but no
tape device exists
on the system:
# collect
-s t
.
.
#### RECORD 4 (943046239:0)
(Fri Nov 19 16:17:19 1999) ####
#### RECORD 5 (943046249:0)
(Fri Nov 19 16:17:29 1999) ####
|
–S
|
Sorts processes
according to their %CPU usage (percentage of
processing time used).
|
–t
|
Prefixes a "tag" to
all data lines to facilitate manipulation of
data by scripts.
|
–T
|
Specifies only
that total disk and tape throughput be recorded
or displayed as the Sum MB/sec. All other subsystems
are deselected.
|
–v
|
Enables verbose
mode, listing the devices attached to the system,
as in the following example:
cariad > collect -v
No objects found of type
hardware/tape
found 4 Disks, 0 Tapes
found CPU 0 at slot [0]
found CPU 1 at slot [1]
max_procs = 16384
SAMPLE: 0
Initializing (10.0 seconds)
|
–V
|
Displays Collect
executable and data file versions. Also, if
used with the -p (play-back file)
option, also displays the version of the data
file.
|
–W
|
Declares how often
Collect should write to disk, using the following
format:
-p number_unit
Where number is an integer representing
the number of write instances and unit is
one of the time options (wdhm), such as
in the following examples:
-W 1h
Collect writes data to disk once per
hour.
-W 1h30m
Collect writes data to disk every 90
minutes.
|