Had a duh moment: just call sysctl in Mac OS X and use the proper keyword. Then do string processing. Fix coming soon.