Bug 1214364

Summary: RFE: provide per-process network statistics
Product: [Fedora] Fedora Reporter: Marko Myllynen <myllynen>
Component: pcpAssignee: Andreas Gerstmayr <agerstmayr>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agerstmayr, lberk, mgoodwin, nathans, pcp
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 17:57:09 UTC Type: Bug
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:    
Bug Blocks: 1733901    

Description Marko Myllynen 2015-04-22 14:37:16 UTC
Description of problem:
Currently PCP already provides comprehensive cpu/mem/io per-process level statistics but nothing about their network usage. It would be great if PCP could also provide per-process level network statistics alongside with cpu/mem/io stats. nethogs [1] could perhaps be checked for inspiration, it can provide bandwidth usage per process without stap scripts or other such "external" components (it requires root privileges, though).

1) http://nethogs.sourceforge.net/

Thanks.

Comment 1 Nathan Scott 2015-04-23 02:04:55 UTC
Also may be worth perusing the netatop [2] netfilter module, since we've begun looking into using the frontend atop code directly, which (optionally) uses that instrumentation too.  So a nicely integrated monitoring frontend would come effectively "for free" if we're lucky (well, a netatop PMDA would be needed too, so not quite free).

2) http://www.atoptool.nl/netatop.php

Comment 2 Fedora End Of Life 2016-07-19 13:49:33 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Frank Ch. Eigler 2016-07-19 13:52:25 UTC
A systemtap script interfacing to pmdajson should be able to gather this info.

Comment 4 Marko Myllynen 2016-12-13 11:59:13 UTC
This would still be useful, re-opening (once) in case this can be considered (or the suggestion in comment #3 be made consumable by regular users). Thanks.

Comment 5 Marko Myllynen 2017-11-27 09:03:48 UTC
It'd be best to continue this discussion upstream:

https://github.com/performancecopilot/pcp/issues/321

Comment 6 Andreas Gerstmayr 2019-07-29 08:02:25 UTC
As of now, we've a few eBPF/BCC tools included in the BCC PMDA which supply network statistics: tcplife, tcpperpid, tcptop and tcpretrans.
The first two capture TCP sessions that open and close while the PMDA is running, tcptop summarizes throughput by host and port, and tcpretrans shows details of TCP retransmits.

Comment 7 Andreas Gerstmayr 2021-01-29 17:49:39 UTC
Feature is completed upstream and will land in PCP 5.2.4 on Feb 10, 2021.

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