到unix编程FAQ中,查找一下,里面有几个例子,能实现top的部分输出结果。作者: shangxd 时间: 2003-05-07 14:02 标题: 如何将shell程序加到c语言程序里去,编译成功呢 好像可以直接从内核中读取数据,你可以看看top的源代码,看看有没有帮助。作者: cs 时间: 2003-05-07 14:38 标题: 如何将shell程序加到c语言程序里去,编译成功呢 read /proc for the information of all running processes, in fact, top get the info there.作者: 蓝色键盘 时间: 2003-05-07 15:06 标题: 如何将shell程序加到c语言程序里去,编译成功呢