NetBSD support
Roughly two months have passed since I last announced that psutil added support for OpenBSD. Today I’m happy to announce that it’s the turn of NetBSD! This was contributed by Thomas Klausner, Ryo Onodera and myself in PR-557.
Differences with FreeBSD (and OpenBSD)
The NetBSD implementation has limitations similar to the ones I encountered with OpenBSD. Again, FreeBSD remains the BSD variant with the best support in terms of kernel functionality.
Process.memory_maps()is not implemented. The kernel provides the necessary pieces, but I haven’t done this yet (hopefully later).Process.num_ctx_switches()’sinvoluntaryfield is always 0. Thekinfo_proc()syscall provides this info, but it’s always set to 0.Process.cpu_affinity()(get and set) is not supported.psutil.cpu_count()(logical=False)always returnsNone.
As for the rest: it is all there. All memory, disk, network and process APIs are fully supported and functioning.
Other enhancements available in this psutil release
Besides NetBSD support, this release has a couple of interesting enhancements:
#708: [Linux]
psutil.net_connections()andProcess.connections()can be up to 3x faster when there are many connections.#718:
psutil.process_iter()is now thread safe.
You can read the rest in the changelog, as usual.