- 02 Nov, 2021 1 commit
-
-
After readlinkat, the nul character is not written at the correct index. When readlinkat truncates the result, the code writes after the end of the array, which triggers an assert in libstdc++. In the other cases, it leaves an uninitialized char 'u' at the end of the array, but the code stops at the ']' of "socket:[...]u". (cherry picked from commit 6a60a626)
-
- 05 Sep, 2021 1 commit
-
-
Alexander Lohnau authored
If you want git blame to ignore formatting revisions run: git config blame.ignoreRevsFile .git-blame-ignore-revs
-
- 21 Jul, 2021 1 commit
-
-
Arjen Hiemstra authored
This moves fetching socket info and mapping that to inodes and pids to its own thread that updates on a regular interval of 500ms. This gives us more control over how often this update happens and detaches it from the packet handling. If the address/inode/pid is not known, we simply return an invalid result like we would previously for items where we are unable to determine the PID. This can in theory lead to missing data from processes, if the socket gets constantly recreated in between the 500ms updates.
-
- 29 Jun, 2021 2 commits
-
-
Alexander Lohnau authored
-
Alexander Lohnau authored
-
- 20 Apr, 2021 4 commits
-
-
Saves parsing all these files in /proc/net. For now the old code path is retained as fallback when there is some error communicating with the kernel.
-
The return value of compare is 0 if both strings match https://en.cppreference.com/w/cpp/string/basic_string/compare
-
Arjen Hiemstra authored
Summary: See https://bugzilla.opensuse.org/show_bug.cgi?id=1151190 and its dependencies for details. Test Plan: Helper still collects data correctly. Reviewers: #plasma, maltek Reviewed By: maltek Subscribers: maltek, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D24359
-
Arjen Hiemstra authored
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 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. Reviewers: #plasma, meven Reviewed By: meven Subscribers: meven, davidedmundson, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D23342
-