File: feature-pcp.xml

package info (click to toggle)
cockpit 337-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,232 kB
  • sloc: javascript: 47,090; python: 38,766; ansic: 35,470; xml: 6,048; sh: 3,413; makefile: 614
file content (48 lines) | stat: -rw-r--r-- 2,262 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
	"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id="feature-pcp">
  <title>PCP Metrics</title>

  <para>If available, Cockpit uses the
    <ulink url="https://pcp.io/">Performance Co-Pilot</ulink> framework to
    gather metrics data about the system. This data is used to display the history
    graphs on the "Metrics and history" page.
    Cockpit can use the PCP logging feature to display archived data about the
    system from a different point in time. If PCP is not available, then Cockpit
    gathers the metrics data itself, but archival features are not available.</para>

  <para>Whether or not metrics are archived depends on whether the
    <ulink url="https://linux.die.net/man/1/pmlogger"><code>pmlogger.service</code></ulink>
    systemd unit is running or not. The "Enable PCP metrics collector" button on the
    Metrics page will enable and start this service.</para>

  <para>To see similar metrics data from the command line, you can use tools like
    <ulink url="https://linux.die.net/man/1/pmstat"><code>pmstat</code></ulink>
    or <ulink url="https://linux.die.net/man/1/pminfo"><code>pminfo</code></ulink>:</para>

<programlisting>
$ <command>pmstat</command>
@ Sat Sep 26 15:30:10 2015
 loadavg                      memory      swap        io    system         cpu
   1 min   swpd   free   buff  cache   pi   po   bi   bo   in   cs  us  sy  id
    4.19      0 20710m 605148  6450m    0    0    0 2548 5688  14K  19   3  76
...
</programlisting>

  <para>These metrics can also be exposed to other machines on a TCP port with
  <ulink url="https://linux.die.net/man/1/pmproxy">pmproxy</ulink>
  and <ulink url="https://redis.io/">Redis</ulink> or <ulink url="https://valkey.io/">Valkey</ulink>:</para>

<programlisting>
systemctl enable --now redis pmproxy
# if you use firewalld, open port 44322:
firewall-cmd --permanent --add-service pmproxy
firewall-cmd --reload
</programlisting>

<para>This allows you to gather and visualize PCP metrics from multiple machines with
  <ulink url="https://grafana.com/">Grafana</ulink> and the
  <ulink url="https://grafana-pcp.readthedocs.io">PCP Grafana plugin</ulink>.</para>

</chapter>