* Process level networking stats.
@ 2024-03-06 22:57 Ben Greear
2024-03-07 3:57 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2024-03-06 22:57 UTC (permalink / raw)
To: netdev
Hello,
I am interested in a relatively straight-forward way to know the tx/rx bytes
sent/received by a process. I do not want to play tricks with packet capture,
and I want this to work for some arbitrary process like a web browser.
I wasn't able to find anything existing for this, though perhaps it exists
and I didn't find it.
If anyone has pointers to existing work in this area, please let me know.
And if not, then any suggestions for best way to go about implementing
this? I assume I should start poking in net/socket.c, and perhaps directly
into ipv4, ipv6 socket logic with care not to count anything going over
localhost??
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Process level networking stats.
2024-03-06 22:57 Process level networking stats Ben Greear
@ 2024-03-07 3:57 ` Jakub Kicinski
2024-03-08 4:20 ` Ben Greear
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2024-03-07 3:57 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
On Wed, 6 Mar 2024 14:57:55 -0800 Ben Greear wrote:
> I am interested in a relatively straight-forward way to know the tx/rx bytes
> sent/received by a process.
What is "relatively straight-forward"? :)
You could out the process in a cgroup and use cgroup hooks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Process level networking stats.
2024-03-07 3:57 ` Jakub Kicinski
@ 2024-03-08 4:20 ` Ben Greear
0 siblings, 0 replies; 3+ messages in thread
From: Ben Greear @ 2024-03-08 4:20 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev
On 3/6/24 19:57, Jakub Kicinski wrote:
> On Wed, 6 Mar 2024 14:57:55 -0800 Ben Greear wrote:
>> I am interested in a relatively straight-forward way to know the tx/rx bytes
>> sent/received by a process.
>
> What is "relatively straight-forward"? :)
> You could out the process in a cgroup and use cgroup hooks
>
The main thing is that I don't want to try to do it with packet capture.
Thanks for the suggestion of using cgroups. I will look into that.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-08 4:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 22:57 Process level networking stats Ben Greear
2024-03-07 3:57 ` Jakub Kicinski
2024-03-08 4:20 ` Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).