如何使用目标C在osx中​​收集系统信息 [英] how to collect system info in osx using objective c

查看:73
本文介绍了如何使用目标C在osx中​​收集系统信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否定义了任何方法/API来收集osx中的系统信息. 我想写一个实用程序,它将收集硬件信息,如CPU,RAM,网络适配器. 任何的想法 ? 预先感谢.

Is there any method / API defined to collect system info in osx. I want to write utility which will collect hardware information like CPU,RAM,Network adapter. Any idea ? Thanks in advance.

推荐答案

最简单的方法是使用

The easiest way is to use the output from the system_profiler command. It also has an -xml option to make the output easy to automatically parse.

这篇关于如何使用目标C在osx中​​收集系统信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆