(by using some of the code Apple has in diagnostic...
# macos
f
(by using some of the code Apple has in diagnostic tools that are on opensource.apple.com but not shipped with the OS)