我正在编写一种工具,我需要收集有关运行Linux系统的信息,而不是sysinfo
可以提供的信息,因为我了解其中许多信息都可以从/proc/
文件系统获得,但是我需要从C语言级别进行操作,是否有任何系统API可以执行此操作,或者我应该只编写为我执行此操作的函数或脚本并将结果传递给我的C程序?
The proc
filesystem is the API: you read the pseudo-files to get the data. This can be done in any programming language, including C.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.