0

OS: Ubuntu MATE 24.04 LTS (recent install on fresh hardware). My system (/) is on an SSD.

I have the system monitor applet in my top panel.
Having enabled 'Use diskstats for NVMe', I noticed frequent orange (writing to disk) spikes.

sudo iotop shows three main 'culprits': jbd2, pmproxy, and pmlogger.

From some searches it turns out that pmproxy & pmlogger are to do with a package called 'cockpit-pcp'. It's not clear from several searches quite what this does, but it would appear to be some kind of 'performance monitoring software' for servers.

Given that my machine is a desktop. And given that the main thing adversely affecting performance — or at least the lifespan of my SSD disk — is the monitor itself.

  1. Why is pcp included and active by default in Desktop Ubuntu?
  2. Can I safely disable and uninstall it?
    If so, how? Is it just a case of sudo apt remove pcp as suggested here?

Update 1 Was pcp installed as a dependency of something else?

$ apt-cache rdepends pcp
pcp
Reverse Depends:
  libpfm4
  cockpit-pcp
  pcp-zeroconf
  pcp-zeroconf
  pcp-zeroconf
  pcp-testsuite
  pcp-gui
  pcp-export-pcp2zabbix
  pcp-export-pcp2zabbix
  pcp-export-pcp2xml
  pcp-export-pcp2xml
  pcp-export-pcp2xlsx
  pcp-export-pcp2xlsx
  pcp-export-pcp2spark
  pcp-export-pcp2spark
  pcp-export-pcp2json
  pcp-export-pcp2json
  pcp-export-pcp2influxdb
  pcp-export-pcp2graphite
  pcp-export-pcp2elasticsearch
  pcp-export-pcp2elasticsearch
  pcp-doc
  pcp-doc
  pcp-doc
  pcp-conf
  libpcp-logsummary-perl
  libpcp3t64
  libpcp3-dev
  libpcp-trace2-dev
  libpcp-pmda3-dev
  libpcp-archive1t64
  cockpit-pcp
$ apt-cache rdepends cockpit-pcp
cockpit-pcp
Reverse Depends:
  cockpit-bridge
  cockpit
  cockpit-bridge
  cockpit
  fbx-all
    cockpit-bridge
$ apt-cache rdepends fbx-all
fbx-all
Reverse Depends:
$ apt-cache rdepends libpfm4
libpfm4
Reverse Depends:
  libpfm4-dev
  llvm-19
  llvm-18
  nsight-systems
  nsight-compute
  pcp
  llvm-18
  llvm-17
  llvm-16
  llvm-15
  llvm-14
  libpapi7.1t64

Nothing stands out

Since installing the OS, I have installed:
Vim, Synaptic Package Manager, GIMP, Chromium, Balsa (email client), TexMaker, TexStudio, Back In Time, Virtualbox.
None of which, I would have thought, would include 'performance monitoring software'.


Update 2 Following the suggestion in @muru's comment to "check the apt logs"

less /var/log/apt/term.log contains:

Log started: 2025-04-13  18:53:58
Selecting previously unselected package gawk.
Reading database ...
Preparing to unpack .../00-gawk_1%3a5.2.1-2build3_amd64.deb ...
Unpacking gawk (1:5.2.1-2build3) ...
Selecting previously unselected package pcp-conf.
*...and lots more pcp packages...*  
...Unpacking pcp (6.2.0-1.1build4) ...
Setting up pcp (6.2.0-1.1build4) ...
...
Created symlink /etc/systemd/system/multi-user.target.wants/pmlogger.service → /usr/lib/systemd/system/pmlogger.service.
...
Created symlink /etc/systemd/system/multi-user.target.wants/pmproxy.service → /usr/lib/systemd/system/pmproxy.service.
...  

Yes, I now remember installing gawk (I think...?).

So, now for the $64000 question...
Why on earth would an install of gawk also install pcp pmlogger !

$ apt-cache depends gawk
gawk
  PreDepends: libc6
  PreDepends: libgmp10
  PreDepends: libmpfr6
  PreDepends: libreadline8t64
  PreDepends: libsigsegv2
  Suggests: gawk-doc
$ apt-cache rdepends gawk
gawk
Reverse Depends:
...
  pcp
...

So gawk doesn't (of course it doesn't) depend upon pcp, but pcp depends upon gawk: quite reasonable.

But I'm still no closer to determining why an install of gawk also installed pcp...


Update 3 Oh!

See my answer...

AlanQ
  • 115

1 Answers1

0

Explanation

Following @muru's comment (to the question), "You have checked the output logs, there's also /var/log/apt/history.log"

In the following output are installs of pcp and various libpcp....

$ less /var/log/apt/history.log  
...  
Start-Date: 2025-04-13  18:53:58
Commandline: apt install dstat
Requested-By: alan (1000)
Install: pcp-conf:amd64 (6.2.0-1.1build4, automatic), pcp:amd64 (6.2.0-1.1build4
), libpcp-mmv1t64:amd64 (6.2.0-1.1build4, automatic), libpcp3t64:amd64 (6.2.0-1.
1build4, automatic), libpcp-import1t64:amd64 (6.2.0-1.1build4, automatic), libpc
p-gui2t64:amd64 (6.2.0-1.1build4, automatic), libpcp-pmda3t64:amd64 (6.2.0-1.1bu
ild4, automatic), gawk:amd64 (1:5.2.1-2build3, automatic), libpcp-archive1t64:am
d64 (6.2.0-1.1build4, automatic), libpcp-web1t64:amd64 (6.2.0-1.1build4, automat
ic), libpcp-pmda-perl:amd64 (6.2.0-1.1build4, automatic), python3-pcp:amd64 (6.2
.0-1.1build4, automatic), libpfm4:amd64 (4.13.0+git32-g0d4ed0e-1, automatic), li
bpcp-trace2t64:amd64 (6.2.0-1.1build4, automatic)
End-Date: 2025-04-13  18:54:00  
...  

I believe the history of my folly is as follows:

  • I noticed unexplained activity on my SSD system disk.
  • In an attempt to find software to show me what was going on — I followed some forum suggestions — and installed both iotop AND dstat (a pcp package, but I didn't know that at the time).
  • I posted a question about jbd2 (which was the main thing poking my disk at the time): Journaling block device (jbd2) hammering my SSD.
  • Unbeknown to me, the install of dstat also installed pcp.
  • pcp started pmlogger, etc, which added to the disk activity.
  • In the process of investigating the original problem, I then noticed the even bigger effect of the pcp software, and posted this question.

My situation reminds me of The Bricklayers Story

Solution

  1. sudo apt remove pcp
    The output contains
    The following packages were automatically installed and are no longer required,
    so then
  2. sudo apt autoremove to remove them
  3. The loggers will still be running, so ps -ef | grep pm to find processes containing pm...
  4. kill <psids> -- kill the processes with the given id's

You should no longer see pmproxy and pmlogger when running sudo iotop.

AlanQ
  • 115