iotop ‚Netlink error: Vorgang nicht zulässig (1)‘ beheben

This post is also available in: English (Englisch)

Problem:

Du versuchst, iotop zu starten, aber siehst nur diese Fehlermeldung:

Netlink error: Vorgang nicht zulässig (1)

The Linux kernel interfaces that iotop relies on now require root priviliges
or the NET_ADMIN capability. This change occured because a security issue
(CVE-2011-2494) was found that allows leakage of sensitive data across user
boundaries. If you require the ability to run iotop as a non-root user, please
configure sudo to allow you to run iotop as root.

Please do not file bugs on iotop about this.

Lösung:

Starte iotop als root:

sudo iotop

Der Grund dafür ist, dass iotop auf Kernel-Interfaces Zugriff benötigt, die nur root oder Prozessen/Nutzern mit der CAP_NET_ADMIN-capability zugänglich sind. Theoretisch könnte man dem iotop-binary diese capability mit sudo setcap cap_net_admin+ep /usr/sbin/iotop geben, unter Ubuntu 18.04 hat dies für mich allerdings nicht funktioniert.