Visit Our UNIX and Linux User Community

Create a list of load averages

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Create a list of load averages
# 1  
Old 03-12-2012
MySQL Create a list of load averages

`/proc/loadavg` give me three indicators of how much work
the system has done during the last 1, 5 & 15 minutes.

How can i get a list of load averages
that each averaged over the last minute for 10 minutes?
# 2  
Old 03-12-2012
for i in 1 2 3 4 5 6 7 8 9 10
     cat /proc/loadavg
     sleep 60
done > /tmp/t.lis
awk '{ sum +=$1; print $1 } END {print sum/NF}'  /tmp/t.lis > avg.lis
# use the avg variable

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 03-12-2012
If you want the load averages from now onwards, you can try:

pandu$ sar -u <time-diff between samples in seconds> <no. of averages>

$ sar -u 4 2
SunOS egluit01 5.10 Generic_144488-14 sun4v    03/12/2012
12:44:17    %usr    %sys    %wio   %idle
12:44:22       0       0       0     100
12:44:26       0       0       0     100
Average        0       0       0     100

Previous Thread | Next Thread
Test Your Knowledge in Computers #947
Difficulty: Medium
Malware a portmanteau for malicious hardware.
True or False?

8 More Discussions You Might Find Interesting

1. Programming

NodeMCU ESP8266 Blynk SSL Application for Linux Server Load Averages

Here is a useful SSL (HTTPS) application for anyone with a remote Linux server they want to keep an eye on using Blynk and the NodeMCU ESP8266. This little app also works (have tested as well) on the WeMos D1 ESP8266 Arduino board. The NodeMCU setup could not be easier, just find a... (8 Replies)
Discussion started by: Neo
8 Replies

2. How to Post in the The UNIX and Linux Forums

Daily averages...

I have date file like below.. 1995 1 2 10 29 38.6706 -6.53823 41.9201 1995 1 2 10 29 -49.2477 -4.59733 17.2704 1995 1 2 10 29 -49.2369 -4.48045 8.61348 1995 1 3 8 48 -42.2643 ... (3 Replies)
Discussion started by: athithi
3 Replies

3. Solaris

Sparc Solaris 10 load averages

our server is running oracle database, it has: load average: 1.77, 1.76, 1.73 using only one cpu. is that too high? thanks. (4 Replies)
Discussion started by: orange47
4 Replies

4. Shell Programming and Scripting

Calculate Averages !

Hi, I have a file with more than 2,000 rows like this: 05/26/2011,1200,1500 I would like to create a awk shell script that calculate the price average of the second and third field each 5,10 and 20 rows or ask me for the values, starting at first row. Finally compare the average value... (1 Reply)
Discussion started by: csierra
1 Replies

5. Shell Programming and Scripting

shell script to create disk load

friends , need a shell script to create a disk load. can any one pls guide me with how this can be implemented. Pls provide the concept. from there i will try to design my script. (3 Replies)
Discussion started by: achak01
3 Replies

6. UNIX for Dummies Questions & Answers

create and load my own .profile

Hello to everyone, This is my first that I use any group in order to find a reply to my question. I would really like your help!!! Do you know how can I create my own .profile file in unix (not edit the existing one) and how can I load it when i open a new bash? I would like those settings... (1 Reply)
Discussion started by: unbalanced
1 Replies

7. Shell Programming and Scripting

Need help in wrting Load Script for a Load-Resume type of load.

hi all need your help. I am wrting a script that will load data into the table. then on another load will append the data into the existing table. Regards Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies

8. UNIX for Advanced & Expert Users

Sun: High kernel usage & very high load averages

Hi, I am seeing very high kernel usage and very high load averages on my system (Although we are not loading much data to our database). Here is the output of top...does anyone know what i should be looking at? Thanks, Lorraine last pid: 13144; load averages: 22.32, 19.81, 16.78 ... (4 Replies)
Discussion started by: lorrainenineill
4 Replies

Featured Tech Videos