如何在没有exec的情况下获取CPU使用率和RAM使用率? [英] How to get CPU usage and RAM usage without exec?
问题描述
VBulletin如何在不使用exec
的情况下获取系统信息?在没有exec的情况下,我还能获得关于服务器的其他信息吗?我感兴趣的是:
How does VBulletin get the system information without the use of exec
? Is there any other information I can get about the server without exec? I am interested in:
- 使用的带宽
- 系统类型
- CPU速度/使用率/计数
- RAM使用率
推荐答案
使用 PHPSysInfo 库
Use PHPSysInfo library
phpSysInfo是一个开放源代码PHP脚本,它显示有关正在访问的主机的信息.它将显示如下内容:
phpSysInfo is a open source PHP script that displays information about the host being accessed. It will displays things like:
- 正常运行时间
- CPU
- 内存
- SCSI,IDE,PCI
- 以太网
- 软盘
- 视频信息
它直接解析/proc
并且不使用exec
.
It directly parsed parses /proc
and does not use exec
.
另一种方法是使用 Linfo .这是一个非常快速的跨平台 php脚本,它非常详细地描述了主机服务器,并提供了诸如ram使用率,磁盘空间,raid阵列,硬件,网卡,内核,os,samba/等信息.杯子/truecrypt状态,温度,磁盘等等.
Another way is to use Linfo. It is a very fast cross-platform php script that describes the host server in extreme detail, giving information such as ram usage, disk space, raid arrays, hardware, network cards, kernel, os, samba/cups/truecrypt status, temps, disks, and much more.
这篇关于如何在没有exec的情况下获取CPU使用率和RAM使用率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!