How to get the CPU load from the server

3

I'm looking for ways to get the server CPU load, previously used scripts where there was the exec() function that on this other server has the function disabled by security.

Would there be another way to do this?

    
asked by anonymous 24.01.2015 / 03:06

2 answers

5

You can use the PHPSysInfo library that is open source and not uses exec() , some of the information that can be obtained are: Activity time, RAM usage statistics, temperature, number of processes, kernel version, etc.

Demo

Another alternative is Linfo , cross-platform and you can get information such as: Statistics of RAM usage, disk space, activity time, kernel version, temperature, etc.

Demo

    
24.01.2015 / 03:12
1

You can also use the sys_getloadavg() function.

This function returns an array containing 3 values representing a mean of the system load in the last 1, 5, and 15 minutes respectively.

Documentation

    
24.01.2015 / 03:19