Bug 1733901

Summary: [RFE] Add process wise network bandwidth usage feature in PCP atop
Product: Red Hat Enterprise Linux 8 Reporter: Yogesh Babar <ybabar>
Component: pcpAssignee: Andreas Gerstmayr <agerstmayr>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0CC: agerstmayr, chorn, mgoodwin, nathans, patrickm
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pcp-5.2.5-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:19:30 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1214364    
Bug Blocks:    

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>
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

Comment 15 errata-xmlrpc 2021-05-18 15:19:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (pcp bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1754