Some time ago, I ported the SLURM HPC cluster resource manager to FreeBSD. Almost all the features now work, but complete job accounting depends on linprocfs to gather process memory use, cpu time, etc. The SLURM code only offers complete accounting for a couple of platforms, using non-portable code. The Linux code simply parses files under /proc. This works on FreeBSD if linprocfs is mounted and the path is changed to /compat/linux/proc.
I'm curious about possible ways to gather stats directly on FreeBSD, without a linuxulator dependency.
From what I've found so far, libprocstat appears to be the high-level interface for doing this sort of thing under FreeBSD, but it also appears to be endemic to FreeBSD.
I'm losing hope of finding a truly portable interface, but I'd prefer to find a method that's at least somewhat portable, so we don't squander precious man-hours writing redundant code. It looks like kvm_getprocs() might at least provide a somewhat uniform interface across BSD systems.
Anyone have other suggestions?
Thanks,
Jason
I'm curious about possible ways to gather stats directly on FreeBSD, without a linuxulator dependency.
From what I've found so far, libprocstat appears to be the high-level interface for doing this sort of thing under FreeBSD, but it also appears to be endemic to FreeBSD.
I'm losing hope of finding a truly portable interface, but I'd prefer to find a method that's at least somewhat portable, so we don't squander precious man-hours writing redundant code. It looks like kvm_getprocs() might at least provide a somewhat uniform interface across BSD systems.
Anyone have other suggestions?
Thanks,
Jason