DOKK / manpages / debian 10 / pcp / pcp-dstat.1.en
PCP-DSTAT(1) General Commands Manual PCP-DSTAT(1)

pcp-dstat - versatile tool for generating system resource statistics

pcp [pcp options] dstat [dstat options] [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.

Additionally, this version introduces configuration files similar to pmrep.conf(5) from the pmrep(1) utility. 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. This new style of plugin is either built-in (time-related reporting only), or sourced from the system-wide location ($PCP_ETC_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.

The available dstat options are:

list all available plugin names
enable any plugin by name
equals -cdngy (default plugin set)
enable CPU stats (system, user, idle, wait), for more CPU related stats also see --cpu-adv and --cpu-use
include CPU0, CPU3 and total (when using -c/--cpu); use all to show all CPUs
enable disk stats (read, write), for more disk related stats look into the other --disk plugins
include total and hda (when using -d/--disk)
enable page stats (page in, page out)
enable interrupt stats
include interrupt 5 and 10 (when using -i/--int)
enable load average stats (1 min, 5 mins, 15 mins)
enable memory stats (used, buffers, cache, free); for more memory related stats also try --mem-adv and --swap
enable network stats (receive, send)
include eth1 and total (when using -n/--net)
show the number of packets received and transmitted
enable process stats (runnable, uninterruptible, new)
show total number of processes
enable I/O request stats (read, write requests)
enable swap stats (used, free)
include swap1 and total (when using -s/--swap)

--snooze show time spent between updates in seconds

enable time/date output (try --time-adv for millisecond precision)
enable time counter (seconds since epoch, or millisecond precision from the --epoch-adv plugin)
enable system stats (interrupts, context switches)
enable aio stats (asynchronous I/O)
enable advanced CPU stats
enable only CPU usage stats
average queue length of the requests that were issued to the device
average size (in sectors) of the requests that were issued to the device
average service time (in milliseconds) for I/O requests that were issued to the device
number of transfers per second that were issued to the device
percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device)
average time (in milliseconds) for I/O requests issued to the device to be served
enable filesystem stats (open files, inodes)
per filesystem used and available space
enable ipc stats (message queue, semaphores, shared memory)
enable file lock stats (posix, flock, read, write)
enable advanced memory stats
enable raw stats (raw sockets)
enable socket stats (total, tcp, udp, raw, ip-fragments)
enable tcp stats (listen, established, syn, time_wait, close)
enable udp stats (listen, active)
enable unix stats (datagram, stream, listen, active)
shows login information from utmp(5)
enable virtual memory stats (hard pagefaults, soft pagefaults, allocated, free)
enable advance virtual memory stats (steal, scanK, scanD, pgoru, astll)
show NFS v3 client operations
show extended NFS v3 client operations
show NFS v3 server operations
show extended NFS v3 server operations
show extended NFS v4 server operations
show NFS v4 stats
show remote procedure call (RPC) client calls stats
show remote procedure call (RPC) server calls stats
show most expensive block I/O process
show most expensive block I/O process (incl. PID and other stats)
show process waiting for child the most
show most expensive CPU process
show most expensive CPU process (incl. PID and other stats)
show process using the most CPU time (in milliseconds)
show process with the highest average timeslice (in milliseconds)
show most frequent interrupt
show most expensive I/O process
show most expensive I/O process (incl. PID and other stats)
show process with highest total latency (in milliseconds)
show process with the highest average latency (in milliseconds)
show process using the most memory
show process that will be killed by the out-of-memory (OOM) killer the first
expand -C, -D, -I, -N and -S discovery lists
equals -pmgdsc -D total
force bits for values expressed in bytes
force float values on screen (mutually exclusive with --integer)
force integer values on screen (mutually exclusive with --float)
change colors for white background terminal
disable colors
disable repetitive headers
disable intermediate updates when delay greater than 1.
write CSV (Comma-Separated Value) format output to a file.

Some pcp-dstat configuration files require the installation of optional Performance Metric Domain Agents, above and beyond the default installed set.

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
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)

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 <pcp@groups.io> if you need or implement any of these, and we'll work with you to get them included.

battery in percentage (needs an ACPI PMDA)
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)
GPFS read/write I/O (needs mmpmon and a GPFS PMDA)
GPFS filesystem operations (needs mmpmon and a GPFS 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)
show ZFS arc stats (needs a Linux ZFS PMDA)
show ZFS l2arc stats (needs a Linux ZFS PMDA)
show ZFS zil stats (needs a Linux ZFS PMDA)

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/pcp/dstat/
system-wide configuration files

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).

Internal plugins behaviour can be changed through environment variables.

strftime(3) format string for reporting time (see --time)

The Dstat utility was initially written by Dag Wieers <dag@wieers.com>.

The Dstat homepage is at http://dag.wieers.com/home-made/dstat/.

This manpage was initially written by Andrew Pollock <apollock@debian.org> for the Debian GNU/Linux system.

The pcp-dstat utility is written and maintained by the PCP developers <pcp@groups.io>.

The PCP homepage is at https://pcp.io/.

PCPIntro(1), pcp(1), pmcd(1), pminfo(1), pmlogger(1), pmprobe(1), pmrep(1), vmstat(1), pmGetOptions(3), strftime(3), PMNS(5), pcp.conf(5), pmrep.conf(5) and utmp(5).

PCP Performance Co-Pilot