D23342: Add a per-process network information plugin

Arjen Hiemstra noreply at phabricator.kde.org
Thu Aug 22 11:59:55 BST 2019


ahiemstra created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
ahiemstra requested review of this revision.

REVISION SUMMARY
  This adds a ksysguard process plugin that provides information about
  how much data is being used by a certain process. Since there is no
  unpriviledged API available (yet?) for this information, a small
  helper application is used that uses libpcap to capture packet sizes,
  which is then mapped to individual processes by comparing sockets to
  entries in /proc.
  
  The helper application is intentionally kept small and should not
  require anything else than `cap_net_raw`.
  
  Depends on D23287 <https://phabricator.kde.org/D23287>

TEST PLAN
  Ensure ksgrd_network_helper has cap_net_raw set, by running 
  `setcap cap_net_raw+ep ksgrd_network_helper`. After that, start
  ksysguard. The "upload" and "download" columns should be
  automatically enabled and display network traffic for a certain
  process.

REPOSITORY
  R106 KSysguard

BRANCH
  network_plugin

REVISION DETAIL
  https://phabricator.kde.org/D23342

AFFECTED FILES
  CMakeLists.txt
  cmake/FindLibcap.cmake
  cmake/Findlibpcap.cmake
  plugins/CMakeLists.txt
  plugins/process/network/CMakeLists.txt
  plugins/process/network/README.md
  plugins/process/network/helper/Accumulator.cpp
  plugins/process/network/helper/Accumulator.h
  plugins/process/network/helper/CMakeLists.txt
  plugins/process/network/helper/Capture.cpp
  plugins/process/network/helper/Capture.h
  plugins/process/network/helper/ConnectionMapping.cpp
  plugins/process/network/helper/ConnectionMapping.h
  plugins/process/network/helper/Packet.cpp
  plugins/process/network/helper/Packet.h
  plugins/process/network/helper/TimeStamps.h
  plugins/process/network/helper/main.cpp
  plugins/process/network/network.cpp
  plugins/process/network/network.h
  plugins/process/network/networkplugin.json

To: ahiemstra
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190822/c78031fd/attachment.html>


More information about the Plasma-devel mailing list