How to get CPU usage and RAM usage without exec?

前端 未结 5 2105
日久生厌
日久生厌 2020-11-28 05:19

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 i

5条回答
  •  青春惊慌失措
    2020-11-28 05:50

    Use PHPSysInfo library

    phpSysInfo is a open source PHP script that displays information about the host being accessed. It will displays things like:

    • Uptime
    • CPU
    • Memory
    • SCSI, IDE, PCI
    • Ethernet
    • Floppy
    • Video Information

    It directly parsed parses /proc and does not use exec.


    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.

提交回复
热议问题