I'm targeting macOS, but MobileGestalt seems to work great for retrieving macOS system-wide information.
The information is used both for user-level presentation and adjusting app behavior accordingly.
Topic:
App & System Services
SubTopic:
Core OS