Search code examples
linuxloaduptime

Command to get only the load average Linux


I need a command to get a output of the load average of linux system to use on a script.

I know the command uptime, but using that command I get all that stuff i don't want, like: 12:09:31 up 20:57, 2 users, load average: 0.12, 0.10, 0.09.

How can I get only the load average on the output?

Like this: load average: 0.11 (for example)

Thank you for your help and sorry my poor english.


Solution

  • I just googled and found this.

    Hope this helps :

    http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

    I think this command will solves your question.

    cat /proc/loadavg