在unix/linux获取cpu信息,cpu使用率,内存使用率,磁盘id这些信息,一般采用的方法是分析/proc文件,那些信息用程序分析比较麻烦,这儿推荐Procps工具。
procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill.
Version 3 includes NPTL thread support, a rewritten top, many bug fixes, performance improvements, and new features.
Procps项目地址:http://procps.sourceforge.net/