Skip to content

Instantly share code, notes, and snippets.

@cecil
Created January 30, 2015 17:29
Show Gist options
  • Save cecil/6df662b7947ef062918c to your computer and use it in GitHub Desktop.
Save cecil/6df662b7947ef062918c to your computer and use it in GitHub Desktop.
collectl documentation --help -x --showoptions --showsubsys --showsubopts
[root@tl-oss-00 /]# collectl --help
This is a subset of the most common switches and even the descriptions are
abbreviated. To see all type 'collectl -x', to get started just type 'collectl'
usage: collectl [switches]
-c, --count count collect this number of samples and exit
-f, --filename file name of directory/file to write to
-i, --interval int collection interval in seconds [default=1]
-o, --options options misc formatting options, --showoptions for all
d|D - include date in output
T - include time in output
z - turn off compression of plot files
-p, --playback file playback results from 'file' (be sure to quote
if wild carded) or the shell might mess it up
-P, --plot generate output in 'plot' format
-s, --subsys subsys specify one or more subsystems [default=cdn]
--verbose display output in verbose format (automatically
selected when brief doesn't make sense)
Various types of help
-h, --help print this text
-v, --version print version
-V, --showdefs print operational defaults
-x, --helpextend extended help, more details descriptions too
-X, --helpall shows all help concatenated together
--showoptions show all the options
--showsubsys show all the subsystems
--showsubopts show all subsystem specific options
--showtopopts show --top options
--showheader show file header that 'would be' generated
--showcolheaders show column headers that 'would be' generated
--showslabaliases for SLUB allocator, show non-root aliases
--showrootslabs same as --showslabaliases but use 'root' names
Copyright 2003-2014 Hewlett-Packard Development Company, L.P.
collectl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the source kit
[root@tl-oss-00 /]# collectl -x
This is the complete list of switches, more details in man page
--align align on time boundary
--all selects 'all' summary subsystems except slabs,
which means NO detail or process data either
note: the opposite of --all is -s-all
-A, --address addr[:port[:time]] open a socket/port on addr with optional
timeout OR run as a server with no timeout
--comment string add the string to the end of the header
-C, --config file use alternate collectl.conf file
-c, --count count collect this number of samples and exit
-d, --debug debug see source for details or try -d1 to get started
-D, --daemon run as a daemon
--extract file extract a subset of a raw file into another one
-f, --filename file name of directory/file to write to
-F, --flush seconds number of seconds between output buffer flushes
--from time time from which to playback data, -thru optional
[yyyymmdd:]hh:mm[:ss][-[yyyymmdd:]hh:mm[:ss]]
--grep pattern print timestamped entries in raw file for each
occurance of pattern
-G, --group write process/slab data to separate, rawp file
-h, --help print basic help
--home move cursor to top before printing interval data
--hr,--headerrepeat num repeat headers every 'num' lines, once or never
--import file name of file(s) to use for data importation
-i, --interval int[:pi:ei]] collection interval in seconds
[defaults: interactive=1, daemon=10]
pi is process interval [default=60]
ei is environmental interval [default=300]
--iosize include I/O sizes as appropriate in brief format
-l, --limits limits override default exceptions name:val[-name:val]
-m, --messages write messages to log file and/or terminal
-N, --nice give yourself a 'nicer' priority
--nohup do not exit if the process that started collectl exits
--offsettime secs seconds by which to offset times during playback
-o, --options misc formatting options, --showoptions for all
-p, --playback file playback results from 'file'
--passwd file use this instead if /etc/passwd for UID->name
--pname name set process name to 'collectl-pname'
-P, --plot generate output in 'plot' format
--procanalyze analyze process data, generating prcs file
--quiet do note echo warning messages on the terminal
-r, --rolllogs time,d,m roll logs at 'time', retaining for 'd' days,
every 'm' minutes [default: d=7,m=1440]
--rawtoo when run with -P, this tell collectl to also
create a raw log file as well
--runas uid[:gui] collectl will change its uid/gid in daemon mode
see man page for details
-R, --runtime duration time to run in <number><units> format
where unit is w,d,h,m,s
--sep separator specify an alternate plot format separator
--slabanalyze analyze slab data, generating slbs file
--stats same as -oA
-s, --subsys subsys record/playback data from one or more subsystems
--showsubsys for details
--sumstat same as --stats but only summary
--thru time time thru which to playback data (see --from)
--top [type][,num] show top 'num' processes sorted by type
--showtopopts for details
--tworaw synonym for -G and -group, which are now deprecated
--umask mask set output file permissions mask (see man umask)
--utime mask write diagnostic micro timestamps into raw file
--verbose display output in verbose format (automatically
selected when brief doesn't make sense)
-w, --wide print wide field contents (don't use K/M/G)
Synonyms
--utc = -oU
These are Alternate Display Formats
--vmstat show output similar to vmstat
Logging options
--rawtoo used with -P, write raw data to a log as well
--export name[,options] write data to an exported socket/file
Various types of help
-h, --help print this text
-v, --version print version
-V, --showdefs print operational defaults
-x, --helpext extended help
-X, --helpall shows all help concatenated together
--showoptions show all the options
--showsubopts show all substem specific options
--showsubsys show all the subsystems
--showtopopts show --top options
--showheader show file header that 'would be' generated
--showcolheaders show column headers that 'would be' generated
--showslabaliases for SLUB allocator, show non-root aliases
--showrootslabs same as --showslabaliases but use 'root' names
--whatsnew show summary of recent version new features
Copyright 2003-2014 Hewlett-Packard Development Company, L.P.
collectl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the source kit
[root@tl-oss-00 /]# collectl --showoptions
Various combinations can be specified with -o or --options, both interactively
and in playback mode, in far too many combinations to describe. In general if
they make sense together they probably work!
Date and Time
d - preface output with 'mm/dd hh:mm:ss'
D - preface outout with 'ddmmyyyy hh:mm:ss'
T - preface output with time only
U - preface output with UTC time
m - when reporting times, include milli-secs
Numerical Formats
g - include/substitute 'g' for decimal point for numbers > 1G
G - include decimal point (when it will fit) for numbers > 1G
Exception Reporting
x - report exceptions only (see man page)
X - record all values + exceptions in plot format (see manpage)
Modify results before display (do NOT effect collection)
n - do NOT normalize rates to units/second
Plot File Naming/Creation
a - if plotfile exists, append [default=skip -p file]
c - always create new plot file
u - create unique plot file names - include time
Plot Data Format
1 - plot format with 1 decimal place of precision
2 - plot format with 2 decimal places of precision
z - don't compress output file(s)
File Header Information
i - include file header in output
[root@tl-oss-00 /]# collectl --showsubsys
The following subsystems can be specified in any combinations with -s or
--subsys in both record and playbackmode. [default=bcdfijmnstx]
These generate summary, which is the total of ALL data for a particular type
b - buddy info (memory fragmentation)
c - cpu
d - disk
f - nfs
i - inodes
j - interrupts by CPU
l - lustre
m - memory
n - network
s - sockets
t - tcp
x - interconnect (currently supported: OFED/Infiniband)
y - slabs
These generate detail data, typically but not limited to the device level
C - individual CPUs, including interrupts if -sj or -sJ
D - individual Disks
E - environmental (fan, power, temp) [requires ipmitool]
F - nfs data
J - interrupts by CPU by interrupt number
L - lustre
M - memory numa/node
N - individual Networks
T - tcp details (lots of data!)
X - interconnect ports/rails (Infiniband/Quadrics)
Y - slabs/slubs
Z - processes
An alternative format lets you add and/or subtract subsystems to the defaults by
immediately following -s with a + and/or -
eg: -s+YZ-x adds slabs & processes and removes interconnet summary data
-s-n removes network summary data
-s-all removes ALL subsystems, something that can handy when playing back
data collected with --import and you ONLY want to see that data
[root@tl-oss-00 /]# collectl --showsubsys | less
[root@tl-oss-00 /]# collectl --showsubsys | less
[root@tl-oss-00 /]# collectl --showsubsys
The following subsystems can be specified in any combinations with -s or
--subsys in both record and playbackmode. [default=bcdfijmnstx]
These generate summary, which is the total of ALL data for a particular type
b - buddy info (memory fragmentation)
c - cpu
d - disk
f - nfs
i - inodes
j - interrupts by CPU
l - lustre
m - memory
n - network
s - sockets
t - tcp
x - interconnect (currently supported: OFED/Infiniband)
y - slabs
These generate detail data, typically but not limited to the device level
C - individual CPUs, including interrupts if -sj or -sJ
D - individual Disks
E - environmental (fan, power, temp) [requires ipmitool]
F - nfs data
J - interrupts by CPU by interrupt number
L - lustre
M - memory numa/node
N - individual Networks
T - tcp details (lots of data!)
X - interconnect ports/rails (Infiniband/Quadrics)
Y - slabs/slubs
Z - processes
An alternative format lets you add and/or subtract subsystems to the defaults by
immediately following -s with a + and/or -
eg: -s+YZ-x adds slabs & processes and removes interconnet summary data
-s-n removes network summary data
-s-all removes ALL subsystems, something that can handy when playing back
data collected with --import and you ONLY want to see that data
[root@tl-oss-00 /]# collectl --showsubopts
These options are all subsystem specific and all take one or more arguments.
Options typically effect the type of data collectl and filters effect the way
it is displayed. In the case of lustre there are also 'services'
CPU
--cpuopts
z - do not show any detail lines which are ALL 0
--cpufilt perl-regx[,perl-regx...]
this works the same way as dskfilt and netfilt in that it only applies
to output and not data collection. Only data for CPU numbers that
match the pattern(s) will be included in summary stats or displayed
when details are requested. This is mainly here for machines with
high cpu counts which would otherwise overwhelm the detail output.
HINT: you specify the range 1 to 3 in perl like this: 1..3 but collectl
also allows 1-3 (which is NOT perl) for ease of use
Disk
--dskfilt perl-regx[,perl-regx...]
this ONLY applies to disk stats output and not data collection
only data for disk names that match the pattern(s) will be
included in summary stats or displayed when details requested
if you don't know perl, a partial string will usually work too
--dskopts
f - include fractions for some of the detail output columns
i - include average i/o size in brief mode (as with --iosize)
o - exclude unused devices from new headers and plot data
see docs on disk monitoring for more detail
z - do not show any detail lines which are ALL 0
--rawdskfilt
this works like dskfilt except rather than being applied to the
output it applies to the data collection.
--rawdskignore
this is the opposite if --rawdskfilt in that any disks matching this
pattern will not have their statistics recorded as well as not being
shown in any output
Environmental
--envopts [def=fpt] NOTE: these do not filter data on collection
f - display fan data
p - display power data
t - display temperature data
C - display temperature in celcius
F - display temperature in fahrenheit
M - display data on multiple lines (useful when too much data)
T - display all env data truncated to whole integers
0-9 - use as ipmi device number
--envfilt perl-regx
during collection, this filter is applied to the data returned by
ipmitool and only those lines that match are kept
--envremap perl-regx...
a list of regx expressions, comma separated, are applied to the
final env names before reporting
The following are for those needed to develop/debug remapping rules.
See online documentation OR Ipmi.html in docs/
--envrules filename file containin remapping rules
--envdebug show processing of ipmi data
--envtest filename file containing extract of 'ipmitool -c sdr'
Interconnect
--xopts
i - include i/o sizes in brief mode
Interrupts
--intfilt perl-regx
like other filters, this filter only applies to display output
and all interrupts will always be collected and available for
playback
Lustre
--lustopts
B - only for OST's and clients, collect buffer/rpc stats
D - collect lustre disk stats (HPSFS: MDS and OSS only)
M - collect lustre client metadata
O - collect lustre OST level stats (detail mode only and not MDS)
R - collect lustre client readahead stats
--lustsvc: force monitoring/reporting of these lustre services
c - client
m - mds
o - oss
NOTE - you can specify the service in either lower or upper case, in
case other tools might care. see the collectl documentation on lustre
for details
Memory
--memopts
P - display physical portion of verbose display
V - display virtual portion of verbose display
p - display/record alloc/refill number of pages
s - display/record steal/kswap/direct number of pages
R - show changes in memory as rates, not instantaneous values
note that including p or s will collect more data and will slightly increase in processing
time. if neither P or V are specified none of the basic memory stats will be displayed BUT
they will be recorded making it possible to display later either by including P/V as an
option OR leaving off both p and s.
Network
--netfilt perl-regx[,perl-regx...]
this ONLY applies to network stats output and not data collection
only data for network names that match the pattern(s) will be
included in summary stats or displayed when details requested
if you don't know perl, a partial string will usually work too
--netopts eEw99
e - include errors in brief mode and explicit error types in
verbose and detail formats
E - only display intervals which have network errors in them
i - include i/o sizes in brief mode
o - exclude unused devices from new headers and plot data
see docs on network monitoring for more detail
w - sets minimal network name width in network stats output which
can be useful for aligning output from multiple systems
--rawnetfilt
this works like netfilt except rather than being applied to the
output it applies to the data collection.
--rawnetignore
this is the opposite of --rawnetfilt in that any networks matching this
pattern will not have their statistics recorded as well as not being
shown in any output
NFS
--nfsfilt TypeVer,...
C - client
S - server
2 - V2
3 - V3
4 - V4
By specifying a csv list, collectl will only collect/record the type
of data indicated (eg c3,s3 indicates V3 clients/server data)
--nfsopts
z - do not show lines of 0 activity with -sF
Processes
--procopts
c - include cpu time of children who have exited (same as ps S switch)
f - use cumulative totals for page faults in proc data instead of rates
i - show io counters in display
I - disable collection/display of I/O stats. saves over 25% in data
collection overhead
k - remove known shells from process names
m - show memory breakdown and faults in display
p - never look for new pids or threads to match processing criteria
This also improves performance!
r - show root command name for a narrower display, can be combined with w
R - show ALL process priorities ('RT' currently displayed if realtime)
s - include process start times in hh:mm:ss format
S - include process start times in mmmdd-hh:mm:ss format
t - include ALL threads (can be a lot of overhead if many active threads)
u - make username format 12 chars wide. you can also set any arbitrary
width of at least 8, eg u10
w - make format wider by including entire process argument string
you can also set a max number of chars, eg w32
x - include extended process attributes (currently only for context switches)
z - exclude any processes with 0 in sort field
--procfilt: restricts which procs are listed, where 'procs' is of the
Format: <type><match>[[,<type><match>],...], and valid types are any
combinations of:
c - any substring in command name
C - command name starts with this string
f - full path of command (including args) contains string
p - pid
P - parent pid
u - any processes owned by this user's UID or in range xxx-yyy
U - any processes owned by this user
NOTE1: if 'procs' is actually a filename, that file will be read and all
lines concatenated together, comma separted, as if typed in as an
argument of --procfilt. Lines beginning with # will be ignored
as comments and blank lines will be skipped.
NOTE2: if any type fields are immediatly followed by a plus sign, any
threads associated with that process will also be reported.
see man page for important restrictions
--procstate Only show processes in one or more of the following states
D - waiting in uninterruptable disk sleep
R - running
S - sleeping in uninterruptable wait
T - traced or stopped
W - paging
Z - zombie
Slab Options and Filters
--slabopts
s - only show slabs with non-zero allocations
S - only show slabs that have changed since last interval
--slabfilt: restricts which slabs are listed, where 'slab's is of the form:
'slab[,slab...]. only slabs whose names start with this name
will be included
TCP Stack Options - these DO effect data collection as well as printing
--tcpfilt
i - ip stats
t - tcp stats
u - udp stats
c - Icmp Stats
I - ip extended stats, no brief stats so including it will force --verbose
T - tcp extended stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment