Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Format the load average of a linux server using php?

Posted on 2010-09-05
5
Medium Priority
?
464 Views
Last Modified: 2012-05-10
Hello

I'm using the below code to display the load of my linux server.

$info = file_get_contents('/proc/loadavg');

Open in new window


I'd like to format the result which is this: (changes per load of course)  0.71 0.54 0.54 1/78 31161

I'd even be fine with knowing what each number means since then I can just add what each means (each set, I notice is separated by a space) above the printed result.

Thanks
Rob
0
Comment
Question by:showmeurgoods
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:santoshmotwani
ID: 33608477
0
 

Author Comment

by:showmeurgoods
ID: 33608486
Thanks santoshmotwani, but I've its not the output, I have that down correct.  I actually came across that post prior to posting here.

I need to know either what each set of numbers refers to, or how to format them differently to show up better then 5 sets of numbers.

Thanks
Rob
0
 
LVL 16

Accepted Solution

by:
santoshmotwani earned 1000 total points
ID: 33608858
The first three columns measure CPU and IO utilization of the last one, five, and 10 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used.


0
 

Author Closing Comment

by:showmeurgoods
ID: 33609200
This 100% answers my question
0
 
LVL 16

Expert Comment

by:santoshmotwani
ID: 33609286
Cheers
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question