How to get server CPU load

Asked

Viewed 323 times

3

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

There would be another way to do that?

2 answers

5


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

Demo

Another alternative is the Lymph, is cross-Platform and you can get information like: RAM usage statistics, disk space, activity time, kernel version, temperature, etc.

Demo

  • I ended up installing the Phpsysinfo library on the server, thanks for the help.

1

You can also use the function sys_getloadavg().

This function returns an array containing 3 values that represent an average of the system load in the last 1, 5 and 15 minutes respectively.

Documentation

  • Hello, a good alternative since it is not possible to use the exec() function on the server. Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.