Bug 1733901 - [RFE] Add process wise network bandwidth usage feature in PCP atop
Summary: [RFE] Add process wise network bandwidth usage feature in PCP atop
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcp
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.4
Assignee: Andreas Gerstmayr
QA Contact: Jan Kurik
URL:
Whiteboard:
Depends On: 1214364
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-29 07:29 UTC by Yogesh Babar
Modified: 2021-02-12 09:18 UTC (History)
5 users (show)

Fixed In Version: pcp-5.2.5-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Feature Request
Target Upstream Version:


Attachments (Terms of Use)

Description Yogesh Babar 2019-07-29 07:29:03 UTC
Description of problem:

Ideally, the 'n' switch of PCP atop should show the process-wise network bandwidth usage. As per the man page, PCP needs netatop named kernel module but this module is not well maintained and quite old so does not fit with current kernel (RHEL-8). Also, netatop is not maintained and supported by Red Hat so we can not really recommend customers to use it on the production system. 

It has been said that it is possible for atop to read the 'ebpf' metrics and show the process-wise network bandwidth usage but this feature has to be added in PCP-atop. 

Version-Release number of selected component (if applicable):

pcp-zeroconf-4.3.0-4.el8_0.x86_64

How reproducible:


Steps to Reproduce:
1. #pcp atop 
2. use interactive command 'n'

Actual results:
It will not show the process-wise network bandwidth usage

Expected results:
PCP atop should show the process level network bandwidth usage. 

Additional info:

Comment 2 Nathan Scott 2020-07-22 04:58:43 UTC
Assigning to Andreas for research into the possibility of replacing netatop with eBPF code...

Comment 3 Yogesh Babar 2020-07-27 05:29:33 UTC
Thank you Andreas++. Let me know if anything is required my end.

Comment 6 Andreas Gerstmayr 2020-12-18 13:49:35 UTC
bandwidth metrics are include in pcp-5.2.3 and working, however the 'number of packets' metric is difficult to gather and needs an adjustment

Comment 7 Andreas Gerstmayr 2021-01-29 17:45:03 UTC
Decided to use the number of kernel calls instead of the number of packets, because
* number of packets might be inaccurate due to TCP segmentation offload
* there is less overhead with the current eBPF kprobes vs. tracing at the packet level (additionally to the kprobe, because we need the PID)
and documented the change in the pcp-atop manpage.


Work completed in upstream commit:

commit 02f4c642a7ef4ffc222ed661da7e320c9822a5ec (HEAD -> master, upstream/maste>
Author: Andreas Gerstmayr <agerstmayr@redhat.com>
Date:   Wed Jan 27 17:18:42 2021 +0100

    pmdabcc: netproc module: count kernel calls, not packets
    
    * count kernel calls, not packets
    * rename metrics accordingly
    * use a LRU hash for netstats (to recycle old bucket entries)
    * rework qa/1286: use custom socket tool and check exact numbers
    * update pcp-atop man page


Note You need to log in before you can comment on or make changes to this bug.