PCP-SS(1)
๐ pcp-ss ๐
okay bestie, welcome to the pcp-ss manual page โ this is the General Commands Manual entry for pcp-ss, and it's literally the cutest way to report socket statistics. buckle up ๐
โจ NAME โจ
pcp-ss โ report socket statistics ๐ฆ
โจ SYNOPSIS โจ
pcp [pcp options] ss [ss options]
โจ DESCRIPTION โจ
so pcp-ss reports socket statistics, and those stats are collected by the pmdasockets(1) PMDA agent. the whole vibe is that this command is intended to be reasonably compatible with a lot of the ss(8) command line options and reporting formats โ but it ALSO serves up the advantages of local or remote monitoring (in live mode) plus historical replay from a previously recorded PCP archive. main character energy, honestly. ๐
ngl though, there's a whole thing you need to know: since ss(1) has SO many command line options, and a lot of them are the same as standard PCP command line options as described in PCPIntro(1), the pcp-ss tool should always be invoked by users using the pcp front-end. that way, standard PCP commandline options like -h, -a, -S, -T, -O, -z, etc can be passed without conflict with ss(1) options. no drama, no collisions. ๐
see the EXAMPLES sections below for typical usage and command lines.
Live mode uses the pcp -h host option and requires the pmdasockets(1) PMDA to be installed and enabled on the target host (local or remote) โ peep pmdasockets(1) for details on how to enable the sockets PMDA on a particular host. the default source is live metrics collected on localhost, if neither of the -h or -a options are given. ๐
Historical/archive replay uses the pcp -a archive option, where archive is the basename of a previously recorded PCP archive. the archive replay feature is particularly useful because socket statistics can be reported for a designated time using the pcp --origin option (which defaults to the start time of the archive). time travel but make it sockets โฐโจ
๐ EXAMPLES ๐
pcp ssโ display default basic socket information for the local host. this includesNetid(tcp,udp, etc),State(ESTAB,TIME_WAIT, etc),Recv-QandSend-Qqueue lengths and the local and peer address and port for each socket. the whole starter pack fr fr ๐pcp -h somehost ss -noemitauOโ display the same basic socket information as above for the host somehost, which may be the defaultlocalhost. the additional command line arguments (-noemitauO) display one line per socket (-O), numeric (-n) service names (default), timer information (-o), extended socket details (-e), socket memory usage (-m), internal TCP information (-i), both udp (-u) and tcp sockets (-t) and both listening and non-listening sockets (-a). okay that's a LOT of letters but every single one is pulling its weight ๐ซถpcp -a somearchive -S'@Wed 16 Jun 2021 12:57:21' ss -noemitauOโ display the same information as the above example, but for the archive somearchive starting at the given timeWed 16 Jun 2021 12:57:21. note the literal@prefix is required for an absolute time, seePCPIntro(1)for details. the archive must of course contain data for the requested time. you can usepmlogdump -l somearchiveto examine the time bounds of somearchive. โญpcp -a somearchive -O-0 ss -noemitauOโ as above, but with an offset of zero seconds (-O-0) before the current end of somearchive, i.e. the most recently logged data. note that somearchive may be currently growing (i.e. being logged withpmlogger(1)). it's giving live-ish ๐ฑ
โจ OPTIONS โจ
due to the large number of options supported by pcp-ss, the pcp(1) command should always be used to invoke pcp-ss in order to specify options such as the metrics source (host or archive) and also (in archive mode), the requested start time or offset, and timezone using the following options:
-h,--hostโ the remote hostname to connect to in live mode. ๐-a,--archiveโ the archive file to use for historical sampling ๐ผ-O,--originโ the time offset to use within an archive (implies-a) โณ-S,--startโ the start time (e.g. inctime(3)format) to use when replaying an archive โฐ-Z,--timezoneโ use a specific timezone. sincepcp-ssdoesn't report timestamps, this only affects the interpretation of an absolute starting time (-S) or offset (-O). ๐-z,--hostzoneโ in archive mode, use the timezone of the archive rather than the timezone on the local machine runningpcp-ss. the timezone, start and finish times of the archive may be examined usingpmlogdump(1)with the-Loption. ๐ฐ๏ธ
the above pcp options become indirectly available to the pcp-ss command via environment variables โ refer to PCPIntro(1) for a complete description of these options. iykyk โจ
and now, the additional command line options available for pcp-ss itself:
-h,--helpโ show help message and exit ๐-V,--versionโ output version information ๐ท๏ธ-n,--numericโ don't resolve service names (currently always set) ๐ข-a,--allโ display all sockets ๐-l,--listeningโ display listening sockets ๐-o,--optionsโ show timer information โฑ๏ธ-e,--extendedโ show detailed socket information ๐-m,--memoryโ show socket memory usage ๐ง-i,--infoโ show internal TCP information ๐-4,--ipv4โ display only IP version 4 sockets 4๏ธโฃ-6,--ipv6โ display only IP version 6 sockets 6๏ธโฃ-t,--tcpโ display only TCP sockets ๐งต-u,--udpโ display only UDP sockets ๐ฎ-H,--noheaderโ suppress header line ๐-O,--onelineโ socket's data printed on a single line โก๏ธ
lowkey important:-hshows up twice in this page โ once as the PCP--hostoption and once aspcp-ss's own--help. that's exactly why you always go through thepcpfront-end, bestie. no cap. ๐
๐ธ REPORT ๐ธ
the columns in the pcp-ss report vary according to the command line options and have the same interpretation as described in ss(8).
one difference with pcp-ss is that the first line in the report begins with # Timestamp followed by the timestamp (in the requested timezone, see -z and -Z above) of the sample data from the host or archive source. following the timestamp is the currently active filter string for the metrics source. in archive mode, the active filter can be changed dynamically, even whilst the archive is being recorded. ๐คฏ
this is different to ss(8) where the filter is optionally specified on the command line of the tool and is always 'live', i.e. ss(8) does not support retrospective replay. with pcp-ss, the filter is stored in the back-end PMDA, see pmdasockets(1), in the metric network.persocket.filter. the default filter is state connected, which can be changed by storing a new string value in the network.persocket.filter metric using pmstore(1), e.g.
pmstore network.persocket.filter "state established"
this will override the persistent default filter, which is stored in a PMDA configuration file and loaded each time the sockets PMDA is started. see pmdasockets(1) for further details and see ss(8) for details of the filter syntax and examples. ๐
๐ง 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).
๐ SEE ALSO ๐
PCPIntro(1), pcp(1), pmdasockets(1), pmlogger(1), pcp.conf(5) and ss(8).
that's the whole page, bestie โ you ate it. ๐๐
and a lil sign-off for the record: this came from Performance Co-Pilot, the PCP collection, and the manual page is PCP-SS(1). ๐ซถโจ
๐ฆ 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
- centos-stream 9: pcp-doc 6.3.7-14.el9 ยท GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- fedora 43: pcp-doc 7.0.1-1.fc43 ยท GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 ยท GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 ยท GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 ยท GPL-2.0-or-later AND CC-BY-3.0
- ubuntu questing: pcp 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2021,2023 Red Hat
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms