PCP-SS(1) | General Commands Manual | PCP-SS(1) |
pcp-ss - report socket statistics
pcp [pcp options] ss [ss options]
pcp-ss reports socket statistics collected by the pmdasockets(1) PMDA agent. The command is intended to be reasonably compatible with many of the ss(8) command line options and reporting formats, but also offer the advantages of local or remote monitoring (in live mode) and also historical replay from a previously recorded PCP archive. Note that since ss(1) has many command line options, many of which 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. This allows standard PCP commandline options such as -h, -a, -S, -T, -O, -z, etc to be passed without conflict with ss(1) options. 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), see 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).
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:
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.
The additional command line options available for pcp-ss itself are:
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.
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).
PCPIntro(1), pcp(1), pmdasockets(1), pmlogger(1), pcp.conf(5) and ss(8).
PCP | Performance Co-Pilot |