$HOME/.pcp/dstat/
private per-user configuration files
Versatile tool for generating system resource statistics
Part of pcp-dstat(1).
pcp [pcp
options]
dstat
[-acdfghilmnpqrstvVy?]
[-C
cpus]
[-D
disks]
[-L
DM
devices]
[-M
MD
devices]
[-P
partitions]
[-I
interrupts]
[-N
interfaces]
[-o
output-file]
[-S
swap-devices]
[--bits]
[--bw]
[--color]
[--float]
[--integer]
[--nocolor]
[--noheaders]
[--nomissed]
[--noupdate]
[--list]
[--pidfile
pid-file]
[--plugin]
[--all-plugins]
[delay
[count]]
pcp-dstat is a general performance analysis tool allowing you to view multiple system resources instantly, for example you can compare disk usage in combination with interrupts from a disk controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).
It also cleverly gives you the most detailed information in columns and clearly indicates in what magnitude and unit the output is being displayed. Less confusion, fewer mistakes, more efficient.
The delay is the delay in seconds between each update, and the count is the number of updates to display before exiting. The default delay is 1 second and count is unspecified (run until interrupted or end of archive is reached).
This latest generation of Dstat, pcp-dstat, allows for analysis of historical performance data (in the PCP archive format created by pmlogger(1)), as well as distributed systems analysis of live performance data from remote hosts running the pmcd(1) process.
The original Dstat notion of ``plugins'' is replaced by use of named metrics in a Performance Metric Name Space (PMNS(5)) supplied by Performance Metric Domain Agents (PMDAs). Metrics and other formatting information is now specified as plugin configuration files in pcp-dstat(5) format. This new style of plugin is either built-in (time-related reporting only), or sourced from the system-wide location ($PCP_SYSCONF_DIR/dstat) and/or sourced from an individual users set of personal plugins ($HOME/.pcp/dstat).
The list of all available plugins can be seen using the --list dstat command line option.
When invoked via the pcp(1) command, the -h/ --host, -a/ --archive, -O/ --origin, -Z/ --timezone and several other pcp options become indirectly available; refer to PCPIntro(1) for a complete description of these options.
The additional command line options available for pcp-dstat are:
--list
list all available plugin names
--plugin-name
enable any plugin by name
-a, --all
equals -cdngy (default plugin set)
-c, --cpu
enable CPU stats (system, user, idle, wait); for more CPU related stats also see --cpu-adv and --cpu-use
-C 0,3,total
include CPU0, CPU3 and total (when using -c/--cpu); use all to show all CPUs
-d, --disk
enable disk stats (read, write); for more disk related stats look into the other --disk plugins
-D total,hda
include total and hda (when using -d/--disk or --disk-tps plugin)
--dm, --device-mapper
enable device mapper stats (read, write); for more device-mapper related stats look into the other --dm plugins
--L total,root,home
include total, root and home (when using --dm/--device-mapper or --dm-tps plugin)
--md, --multi-device
enable multi-device driver stats (read, write); for more multi-device driver related stats look into the other --md plugins
--M total,md-0
include total and md-0 (when using --md/--multi-device or --md-tps plugin)
--part, --partition
enable disk partition stats (read, write); for more partition related stats look into the other --part plugins
--P total,sda2
include total and sda2 (when using --part/--partition or --part-tps plugin)
-g, --page
enable page stats (page in, page out)
-i, --int
enable interrupt stats
-I 5,10
include interrupt 5 and 10 (when using -i/--int)
-l, --load
enable load average stats (1 min, 5 mins, 15 mins)
-m, --mem
enable memory stats (used, buffers, cache, free); for more memory related stats also try --mem-adv and --swap
-n, --net
enable network stats (receive, send)
-N eth1,total
include eth1 and total (when using -n/--net)
--net-packets
show the number of packets received and transmitted
-p, --proc
enable process stats (runnable, uninterruptible, new)
--proc-count
show total number of processes
-r, --io
enable I/O request stats (read, write requests)
-s, --swap
enable swap stats (used, free)
-S swap1,total
include swap1 and total (when using -s/--swap)
--snooze show time spent between updates in seconds
-t, --time
enable time/date output (try --time-adv for millisecond precision)
-T, --epoch
enable time counter (seconds since epoch, or millisecond precision from the --epoch-adv plugin)
-y, --sys
enable system stats (interrupts, context switches)
--aio
enable aio stats (asynchronous I/O)
--cpu-adv
enable advanced CPU stats
--cpu-use
enable only CPU usage stats
--disk-avgqu
average queue length of the requests that were issued to the device
--disk-avgrq
average size (in sectors) of the requests that were issued to the device
--disk-svctm
average service time (in milliseconds) for I/O requests that were issued to the device
--disk-tps
number of transfers per second that were issued to the device
--disk-util
percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device)
--disk-wait
average time (in milliseconds) for I/O requests issued to the device to be served
--fs, --filesystem
enable filesystem stats (open files, inodes)
--freespace
per filesystem used and available space
--ipc
enable ipc stats (message queue, semaphores, shared memory)
--lock
enable file lock stats (posix, flock, read, write)
--mem-adv
enable advanced memory stats
--raw
enable raw stats (raw sockets)
--socket
enable socket stats (total, tcp, udp, raw, ip-fragments)
--tcp
enable tcp stats (listen, established, syn, time_wait, close)
--udp
enable udp stats (listen, active)
--unix
enable unix stats (datagram, stream, listen, active)
--utmp
shows login information from utmp(5)
--vm
enable virtual memory stats (hard pagefaults, soft pagefaults, allocated, free)
--vm-adv
enable advance virtual memory stats (steal, scanK, scanD, pgoru, astll)
--nfs3
show NFS v3 client operations
--nfs3-ops
show extended NFS v3 client operations
--nfsd3
show NFS v3 server operations
--nfsd3-ops
show extended NFS v3 server operations
--nfsd4-ops
show extended NFS v4 server operations
--nfsstat4
show NFS v4 stats
--rpc
show remote procedure call (RPC) client calls stats
--rpcd
show remote procedure call (RPC) server calls stats
--top-bio
show most expensive block I/O process
--top-bio-adv
show most expensive block I/O process (incl. PID and other stats)
--top-childwait
show process waiting for child the most
--top-cpu
show most expensive CPU process
--top-cpu-adv
show most expensive CPU process (incl. PID and other stats)
--top-cputime
show process using the most CPU time (in milliseconds)
--top-cputime-avg
show process with the highest average timeslice (in milliseconds)
--top-io
show most expensive I/O process
--top-io-adv
show most expensive I/O process (incl. PID and other stats)
--top-latency
show process with highest total latency (in milliseconds)
--top-latency-avg
show process with the highest average latency (in milliseconds)
--top-mem
show process using the most memory
--top-oom
show process that will be killed by the out-of-memory (OOM) killer the first
-f, --full
expand -C, -D, -I, -N and -S discovery lists
-v, --vmstat
equals -pmgdsc -D total
--bits
force bits for values expressed in bytes
--float
force float values on screen (mutually exclusive with --integer)
--integer
force integer values on screen (mutually exclusive with --float)
--bw, --blackonwhite
change colors for white background terminal
--nocolor
disable colors
--noheaders
disable repetitive headers
--nomissed
disable missed ticks warnings for intermediate samples.
--noupdate
disable intermediate updates when delay greater than 1.
-o file, --output=file
write CSV (Comma-Separated Value) format output to a file.
-p file, --pidfile=file
write the process identifier to a given file.
Some pcp-dstat configuration files require the installation of optional Performance Metric Domain Agents, above and beyond the default installed set.
|
remaining battery charge in percentage (needs the Denki PMDA) |
|---|---|
|
GPFS read/write I/O (needs the GPFS PMDA) |
|
GPFS filesystem operations (needs the GPFS PMDA) |
|
show innodb buffer stats (needs the MySQL PMDA) |
|
show innodb I/O stats (needs the MySQL PMDA) |
|
show innodb operations counters (needs the MySQL PMDA) |
|
show lustre I/O throughput (needs the Lustre PMDA) |
|
show the number of hits and misses from memcache (needs the Memcached PMDA) |
|
show the MySQL5 command stats (needs the MySQL PMDA) |
|
show the MySQL5 connection stats (needs the MySQL PMDA) |
|
show the MySQL5 innodb stats (needs the MySQL PMDA) |
|
show the MySQL5 I/O stats (needs the MySQL PMDA) |
|
show the MySQL5 keys stats (needs the MySQL PMDA) |
|
show the MySQL I/O stats (needs the MySQL PMDA) |
|
show the MySQL keys stats (needs the MySQL PMDA) |
|
show postfix queue sizes (needs the Postfix PMDA) |
|
show Redis stats (needs the Redis PMDA) |
|
show sendmail queue size (needs the Sendmail PMDA) |
|
show ZFS arc stats (needs the ZFS PMDA) |
|
show ZFS l2arc stats (needs the ZFS PMDA) |
|
show ZFS zil stats (needs the ZFS PMDA) |
Anyone can create additional, custom pcp-dstat plugin configuration files, for any metrics - the list of available metrics can be produced by either the pminfo(1) or pmprobe(1) command.
The following do not yet have metrics backing them, but have been included from the original Dstat utility. Please contact <[email protected]> if you need or implement any of these, and we'll work with you to get them included.
|
battery remaining in hours, minutes (needs an ACPI PMDA) |
|---|---|
|
CPU frequency in percentage (needs an ACPI PMDA) |
|
number of dbus connections (needs a python-dbus PMDA) |
|
fan speed (needs an ACPI PMDA) |
|
show software raid (MD driver) progress and speed (needs new disk.md metrics) |
|
show power usage (needs an ACPI PMDA) |
|
show qmail queue sizes (needs qmail) |
|
show squid usage statistics (needs a Squid PMDA) |
|
system temperature sensors (needs an ACPI PMDA) |
|
show VMware CPU stats from hypervisor (needs a VMware PMDA) |
|
show VMware memory stats from hypervisor (needs a VMware PMDA) |
|
show advanced VMware memory stats from hypervisor (needs a VMware PMDA) |
|
show VMware ESX kernel vmhba stats (needs a VMware PMDA) |
|
show VMware ESX kernel interrupt stats (needs a VMware PMDA) |
|
show VMware ESX kernel port stats (needs a VMware PMDA) |
|
show CPU usage per OpenVZ guest (needs an OpenVZ PMDA) |
|
show I/O usage per OpenVZ guest (needs an OpenVZ PMDA) |
|
show OpenVZ user beancounters (needs an OpenVZ PMDA) |
|
wireless link quality and signal to noise ratio (needs Linux PMDA metrics) |
When invoking pcp-dstat with a delay greater than 1 second and without the --noupdate option, it will show intermediate updates, i.e., the first time a 1 second average, the second update a 2 second average, etc. until the delay has been reached.
So in case you specified a delay of 10, the 9 intermediate updates are NOT snapshots, they are averages over the time that passed since the last final update. The end result is that you get a 10 second average on a new line, just like with vmstat(1).
Using pcp-dstat to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:
$ pcp dstat -dnyc -N eth0 -C total -f 5
Using the time plugin together with cpu, net, disk, system, load and proc plugins:
$ pcp dstat -tcndylp
This is identical to:
$ pcp dstat --time --cpu --net --disk --sys --load --proc
Using pcp-dstat to report 10 samples from metrics recorded in a PCP archive 20180729 from 2:30 AM:
$ pcp --origin '@02:30' -a 20180729 dstat --time --cpu-adv --sys 1 10
Examine the same metrics live from a remote host:
$ pcp --host www.acme.com dstat --time --cpu-adv --sys 1 10
$HOME/.pcp/dstat/
private per-user configuration files
$PCP_SYSCONF_DIR/dstat/
system-wide configuration files
Internal plugins behaviour can be changed through environment variables.
DSTAT_TIMEFMT
strftime(3) format string for reporting time (see --time)
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).
For environment variables affecting PCP tools, see pmGetOptions(3).
11 releases since Debian 3.1 (Sarge); the text changed 5 times.
--L since Debian 13 (Trixie);
--M since Debian 13 (Trixie);
--P since Debian 13 (Trixie);
--aio since Debian 6.0 (Squeeze);
--bits since Debian 10 (Buster);
--blackonwhite since Debian 6.0 (Squeeze);
--bw since Debian 6.0 (Squeeze);
--cpu-adv since Debian 10 (Buster);
--cpu-use since Debian 10 (Buster);
--device-mapper since Debian 13 (Trixie);
--disk-avgqu since Debian 13 (Trixie);
--disk-avgrq since Debian 13 (Trixie);
--disk-svctm since Debian 13 (Trixie);
--disk-tps since Debian 13 (Trixie);
--disk-util since Debian 13 (Trixie);
--disk-wait since Debian 13 (Trixie);
--dm since Debian 13 (Trixie);
--epoch since Debian 5.0 (Lenny);
--filesystem since Debian 10 (Buster);
--float since Debian 6.0 (Squeeze);
--freespace since Debian 13 (Trixie);
--fs since Debian 6.0 (Squeeze);
--io since Debian 6.0 (Squeeze);
--ipc since Debian 5.0 (Lenny);
--list since Debian 6.0 (Squeeze);
--lock since Debian 5.0 (Lenny);
--md since Debian 13 (Trixie);
--mem-adv since Debian 10 (Buster);
--multi-device since Debian 13 (Trixie);
--net-packets since Debian 13 (Trixie);
--nfs3 since Debian 13 (Trixie);
--nfs3-ops since Debian 13 (Trixie);
--nfsd3 since Debian 13 (Trixie);
--nfsd3-ops since Debian 13 (Trixie);
--nfsd4-ops since Debian 13 (Trixie);
--nfsstat4 since Debian 13 (Trixie);
--noheaders since Debian 5.0 (Lenny);
--nomissed since Debian 13 (Trixie);
--output since Debian 5.0 (Lenny);
--part since Debian 13 (Trixie);
--partition since Debian 13 (Trixie);
--pidfile since Debian 13 (Trixie);
--plugin-name since Debian 6.0 (Squeeze);
--proc-count since Debian 13 (Trixie);
--raw since Debian 5.0 (Lenny);
--rpc since Debian 13 (Trixie);
--rpcd since Debian 13 (Trixie);
--socket since Debian 6.0 (Squeeze);
--tcp since Debian 5.0 (Lenny);
--top-bio since Debian 13 (Trixie);
--top-bio-adv since Debian 13 (Trixie);
--top-childwait since Debian 13 (Trixie);
--top-cpu since Debian 13 (Trixie);
--top-cpu-adv since Debian 13 (Trixie);
--top-cputime since Debian 13 (Trixie);
--top-cputime-avg since Debian 13 (Trixie);
--top-io since Debian 13 (Trixie);
--top-io-adv since Debian 13 (Trixie);
--top-latency since Debian 13 (Trixie);
--top-latency-avg since Debian 13 (Trixie);
--top-mem since Debian 13 (Trixie);
--top-oom since Debian 13 (Trixie);
--udp since Debian 5.0 (Lenny);
--unix since Debian 5.0 (Lenny);
--utmp since Debian 13 (Trixie);
--vm since Debian 6.0 (Squeeze);
--vm-adv since Debian 10 (Buster);
-S since Debian 5.0 (Lenny);
-T since Debian 5.0 (Lenny);
-o since Debian 13 (Trixie);
-r since Debian 6.0 (Squeeze).
--csv until Debian 4.0 (Etch);
--noheader until Debian 4.0 (Etch);
--profile until Debian 12 (Bookworm);
--zones until Debian 12 (Bookworm);
-M until Debian 5.0 (Lenny).