First steps in programming FreeBSD: Reading process information reddit / freebsd ---------------------------------------------------------------------- jozefvanerka · 2023-12-14 07:27 Have you ever looked at `libprocstat(3)` ? It's better interface than interacting using kvm-family of functions. ---------------------------------------------------------------------- patmaddox · 2023-12-14 07:50 Yes I referenced `procstat_getprocs(3)` as one of the options I found. Certainly something for me to look into in more depth. Thanks for the suggestion. That brings up another important aspect of learning this stuff: it’s not always clear what the current practices are. I suppose I could look at utilities based on recent commits, and see what they’re doing. Otherwise, how would you suggest learning current practices? It seems like the main way is what happened here - to show something, and have someone more experienced reply with a better alternative. ---------------------------------------------------------------------- jozefvanerka · 2023-12-14 08:08 You might want to have a look at `procstat(1)` source (`usr.bin/procstat`) ---------------------------------------------------------------------- jdugaduc · 2023-12-14 14:22 Man, I really like your FreeBSD articles and discussions in the forum. I’m learning a lot! Thank you! ---------------------------------------------------------------------- patmaddox · 2023-12-14 17:24 You're welcome! And thanks for the kind words. ---------------------------------------------------------------------- mmm-harder · 2023-12-15 00:53 IRC is a great start, lots of good people on the freebsd channels. ---------------------------------------------------------------------- grahamperrin · 2023-12-18 21:20 I'm curious. For the first steps that you chose, might you have *easily* found relevant info at or in the documentation portal? ---------------------------------------------------------------------- patmaddox · 2023-12-18 22:32 I was searching for a C function that reads process information, so man pages are the way to go. The docs don't cover that sort of stuff (though the developers handbook is quite nice).