OperatingSystemMXBean and network usage and limit information
Hohensee, Paul
hohensee at amazon.com
Wed Aug 17 18:40:03 UTC 2022
This is a serviceability-dev issue, redirected.
Thanks,
Paul
-----Original Message-----
From: discuss <discuss-retn at openjdk.org> on behalf of Severin Gehwolf <sgehwolf at redhat.com>
Date: Wednesday, August 17, 2022 at 2:00 AM
To: "discuss at openjdk.org" <discuss at openjdk.org>
Subject: RE: OperatingSystemMXBean and network usage and limit information
Hi,
On Wed, 2022-08-17 at 10:05 +0300, Asaf Mesika wrote:
> Hi,
>
> I've searched through the various mailing lists, but couldn't find a
> suitable one so I'm posting it here.
>
> I would like to have the ability to know from an application the
> current network usage and limit (relative to host or cgroup).
>
> I have seen the class OperatingSystemMXBean that is provided by the
> JDK. I was wondering if the idea of adding that information to this
> bean has been considered in the past.
>
> Currently, the best option I found, which is operating system-
> specific code, is to use the /sys/class/net/ files.
One challenge for this would be to do this in a version agnostic way.
Another is that nothing is using this info at present and we'd have to
have a compelling use-case where adding such an API would be useful.
AFAIK, net_cls which would allow something like that in v1, does not
exist for v2.
With all that said, I don't think there are any plans to do this.
Thanks,
Severin
More information about the serviceability-dev
mailing list