C Is there a higher level API built on top of sysctl(3)?

I'm trying to monitor FreeBSD usage (CPU, RAM, network etc) and the sysctl(3) man page seems to suggest it does what I want.

I want to call if from Python 3.12 so I was thinking about just accessing it directly by calling the C API from within Python but I wanted to check if there was already a Python library that did the hard work already?

Is there already something out there that makes it easier?
 
I'm trying to monitor FreeBSD usage (CPU, RAM, network etc) and the sysctl(3) man page seems to suggest it does what I want.

I want to call if from Python 3.12 so I was thinking about just accessing it directly by calling the C API from within Python but I wanted to check if there was already a Python library that did the hard work already?

Is there already something out there that makes it easier?
Did you try py-sysctl from pypi? There is even the official port: devel/py-sysctl.

There is also devel/py-freebsd-sysctl.
 
Back
Top