PCP-DSTAT(1)
πΈ NAME πΈ
pcp-dstat (from PCP-DSTAT(1)) β versatile tool for generating system resource statistics. π
β¨ SYNOPSIS β¨
okay so the invocation is pcp with some pcp options, then dstat, and the flags go brrr:
pcp [pcp options] dstat [-acdfghilmnpqrstuvVy?] [-C cpus] [-G gpus] [-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]]
π« DESCRIPTION π«
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). Literally the multitasking queen of system stats. π
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. We love an organized icon. β¨
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). So it just keeps going until you say when, or the archive runs out. π«Ά
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. Time travel and remote gossip? It's giving range. π
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). Plugin glow-up, no cap. π
The list of all available plugins can be seen using the --list dstat command line option. Go look, bestie. π
π OPTIONS π
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 β the plugin menu, bestie--plugin-nameβ enable any plugin by name β name-drop your fave-a,--allβ equals-cdngy(default plugin set) β the whole starter pack-c,--cpuβ enable CPU stats (system, user, idle, wait); for more CPU related stats also see--cpu-advand--cpu-use-C 0,3,totalβ include CPU0, CPU3 and total (when using-c/--cpu); useallto show all CPUs--amd-gpu,--nvidia-gpuβ enable stats for the specific GPU architecture (utilization, memory use)-G 0,3β include GPU0 and GPU3 (when using--amd-gpuor--nvidia-gpu)-d,--diskβ enable disk stats (read, write); for more disk related stats look into the other--diskplugins-D total,hdaβ include total and hda (when using-d/--diskor--disk-tpsplugin)--dm,--device-mapperβ enable device mapper stats (read, write); for more device-mapper related stats look into the other--dmplugins--L total,root,homeβ include total, root and home (when using--dm/--device-mapperor--dm-tpsplugin)--md,--multi-deviceβ enable multi-device driver stats (read, write); for more multi-device driver related stats look into the other--mdplugins--M total,md-0β include total and md-0 (when using--md/--multi-deviceor--md-tpsplugin)--part,--partitionβ enable disk partition stats (read, write); for more partition related stats look into the other--partplugins--P total,sda2β include total and sda2 (when using--part/--partitionor--part-tpsplugin)-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-advand--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-advfor millisecond precision, or--timesfor a minimal hours:minutes:seconds form)-T,--epochβ enable time counter (seconds since epoch, or millisecond precision from the--epoch-advplugin)-u,--timesβ enable a short-format system time reporting column (hours:minutes:seconds)-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 fromutmp(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,-Nand-Sdiscovery 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.
β¨ OPTIONAL METRICS PLUGINS β¨
okay bestie, real talk: some pcp-dstat configuration files require the installation of optional Performance Metric Domain Agents, above and beyond the default installed set. it's giving extra credit energy π
--batteryβ remaining battery charge in percentage (needs the Denki PMDA) π--gpfsβ GPFS read/write I/O (needs the GPFS PMDA)--gpfs-opsβ GPFS filesystem operations (needs the GPFS PMDA)--innodb-bufferβ show innodb buffer stats (needs the MySQL PMDA)--innodb-ioβ show innodb I/O stats (needs the MySQL PMDA)--innodb-opsβ show innodb operations counters (needs the MySQL PMDA)--lustreβ show lustre I/O throughput (needs the Lustre PMDA)--memcache-hitsβ show the number of hits and misses from memcache (needs the Memcached PMDA)--mysql5-cmdsβ show the MySQL5 command stats (needs the MySQL PMDA)--mysql5-connβ show the MySQL5 connection stats (needs the MySQL PMDA)--mysql5-innodbβ show the MySQL5 innodb stats (needs the MySQL PMDA)--mysql5-ioβ show the MySQL5 I/O stats (needs the MySQL PMDA)--mysql5-keysβ show the MySQL5 keys stats (needs the MySQL PMDA)--mysql-ioβ show the MySQL I/O stats (needs the MySQL PMDA)--mysql-keysβ show the MySQL keys stats (needs the MySQL PMDA)--postfixβ show postfix queue sizes (needs the Postfix PMDA)--redisβ show Redis stats (needs the Redis PMDA)--sendmailβ show sendmail queue size (needs the Sendmail PMDA)--zfs-arcβ show ZFS arc stats (needs the ZFS PMDA)--zfs-l2arcβ show ZFS l2arc stats (needs the ZFS PMDA)--zfs-zilβ show ZFS zil stats (needs the ZFS PMDA)
π°οΈ HISTORICAL METRICS PLUGINS π°οΈ
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. literally anyone, slay β¨
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-remainβ battery remaining in hours, minutes (needs an ACPI PMDA)--cpufreqβ CPU frequency in percentage (needs an ACPI PMDA)--dbusβ number of dbus connections (needs a python-dbus PMDA)--fanβ fan speed (needs an ACPI PMDA)--md-statusβ show software raid (MD driver) progress and speed (needs newdisk.mdmetrics)--powerβ show power usage (needs an ACPI PMDA)--qmailβ show qmail queue sizes (needsqmail)--squidβ show squid usage statistics (needs a Squid PMDA)--thermalβ system temperature sensors (needs an ACPI PMDA)--vm-cpuβ show VMware CPU stats from hypervisor (needs a VMware PMDA)--vm-memβ show VMware memory stats from hypervisor (needs a VMware PMDA)--vm-mem-advβ show advanced VMware memory stats from hypervisor (needs a VMware PMDA)--vmk-hbaβ show VMware ESX kernel vmhba stats (needs a VMware PMDA)--vmk-intβ show VMware ESX kernel interrupt stats (needs a VMware PMDA)--vmk-nicβ show VMware ESX kernel port stats (needs a VMware PMDA)--vz-cpuβ show CPU usage per OpenVZ guest (needs an OpenVZ PMDA)--vz-ioβ show I/O usage per OpenVZ guest (needs an OpenVZ PMDA)--vz-ubcβ show OpenVZ user beancounters (needs an OpenVZ PMDA)--wifiβ wireless link quality and signal to noise ratio (needs Linux PMDA metrics)
β±οΈ INTERMEDIATE UPDATES β±οΈ
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. no cap.
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). iconic behavior honestly.
π EXAMPLES π
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
π FILES π
$HOME/.pcp/dstat/β private per-user configuration files$PCP_SYSCONF_DIR/dstat/β system-wide configuration files
π± ENVIRONMENT π±
Internal plugins behaviour can be changed through environment variables.
DSTAT_TIMEFMTβstrftime(3)format string for reporting time (see--time)
π PCP ENVIRONMENT π
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).
π AUTHORS π
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/.
π SEE ALSO π
PCPIntro(1), pcp(1), pmcd(1), pminfo(1), pmlogger(1), pmprobe(1), vmstat(1), pmGetOptions(3), strftime(3), PMNS(5), pcp.conf(5), pcp-dstat(5) and utmp(5).
and that's the whole vibe, bestie. this page is brought to you by Performance Co-Pilot and PCP, and it's the PCP-DSTAT(1) manual β no date on the footer, but you know it's timeless πβ¨
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-dstat 7.2.1-1.fc43
- fedora 43: pcp-dstat 7.2.2-1.fc43
- fedora 43: pcp-dstat 7.2.2-2.fc43 Β· GPL-2.0-or-later
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-dstat 7.2.1-1.fc44
- fedora 44: pcp-dstat 7.2.2-1.fc44
- fedora 44: pcp-dstat 7.2.2-2.fc44 Β· GPL-2.0-or-later
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp-dstat 7.2.1-2build1
- Copyright (c) 2018-2025 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms