K
K
Kostya007232016-04-02 01:26:42
linux
Kostya00723, 2016-04-02 01:26:42

How to display the load on the server machine as a percentage?

Task: using PhP to get the total (cpu, ram, disks) load on the server machine in order to convert it immediately to the% format...
How to do it?
I heard something about load average ...
It would be desirable to get the
RAM and CPU load as a percentage

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
magazovski, 2016-04-02
@magazovski

$cpu = `ps aux`;
$ram = `cat /proc/meminfo`;
$storage = `df -h`;

M
Marat Mkhitaryan, 2016-04-02
@DoggerBloger

top command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question