OperatingSystemMXBean and network usage and limit information

Asaf Mesika asaf.mesika at gmail.com
Wed Aug 17 07:05:42 UTC 2022


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.

Thanks,

Asaf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/discuss/attachments/20220817/b07b4a14/attachment.htm>


More information about the discuss mailing list