LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-10-2004, 08:11 AM   #1
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
uptime load averages


hello thur,

i know that the 3 numbers that are outputed from the 'uptime' command are based on the load averages of the past 1, 5, and 15 minutes..

but what is a load average? lol

thanks for the help
 
Old 08-10-2004, 10:12 AM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
The CPU usage. 1.00 = 100% of what your CPU can do. Anything over that means requests are stacking up and waiting for free cycles to run. It's like the boss coming in and dumping more work on your desk when you already have a full day.
 
Old 11-26-2004, 04:39 PM   #3
NeptunEz
Member
 
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52

Rep: Reputation: 15
Quote:
Originally posted by ranger_nemo
The CPU usage. 1.00 = 100% of what your CPU can do. Anything over that means requests are stacking up and waiting for free cycles to run.
How is that possible?
01:38:11 up 10 days, 9:14, 4 users, load average: 2.82, 3.09, 2.85

and gdesklets shows about ~5-25% cpu load

Regards.
 
Old 11-26-2004, 10:35 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
The algorithm for computing load averages is quite trivial -- it's just an average of the number of processes in the CPU's run queue during the given period (1, 5, and 15 minutes) -- on SMP machines it's the sum of the number of processes in each run queue, again averaged. If you have a CPU load of over two, it means, on average, two processes were runable on the CPU during the given period. If you only have one processor, that obviously means that the CPU had to switch back and forth between multiple processes trying to run on it.
 
Old 11-27-2004, 06:42 AM   #5
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
Related info:

The average number of processes running in the last 1, 5 15 minutes may seem to be fairly useless info, but check into the batch command. Batch allows you to run a program(s) when that load average goes below .8 It can be set to a different number with the atrun command. It may come in handy for you some day. If you are running an X windows terminal, try this little perl script to watch the load average in the title bar of the terminal. Run it in the background.

loadavg.pl &

#!/usr/bin/perl
use strict;
$|++;
my $host = `/bin/hostname`;
chomp $host;

while(1) {

#open /proc/loadavg file
open(LOADAVG,"/proc/loadavg") || die "Cannot open /proc/loadavg: $!\n";

my @load=split(/ /,<LOADAVG>);
close(LOADAVG);

print "\033]0;";
print "$host: $load[0] $load[1] $load[2] at ",scalar(localtime);
print "\007";

sleep 2;
}
 
Old 01-06-2005, 03:07 PM   #6
NeptunEz
Member
 
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52

Rep: Reputation: 15
top shows line like this

Cpu(s): 10.4% us, 52.5% sy, 0.0% ni, 0.0% id, 24.5% wa, 5.7% hi, 6.9% si

us - user
sy - system
ni - nice

and others?
 
Old 01-06-2005, 03:15 PM   #7
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
It's all in the man page

WA Size of the swapped out part of the disk
SI Data + Stack size
HI (I am unsure, but I beleive it deals with the highest priority task
 
Old 01-06-2005, 04:05 PM   #8
NeptunEz
Member
 
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52

Rep: Reputation: 15
I suppose all these values are related to CPU load

If you take a sum of all values - you'll get 100.
There is notthing in man page
 
Old 01-06-2005, 04:40 PM   #9
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
According to the man page, The total may not always total to just 100%. True, most people do not even bother with "being nice", but .....

Time spent in niced tasks will also be counted in system and user
time, so the total will be more than 100%.
 
Old 01-06-2005, 04:47 PM   #10
NeptunEz
Member
 
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52

Rep: Reputation: 15
I'm interested in getting cpu load to build graphs. They are 100 height.

If I take user, system, nice loads and add them, i always get less then 100%

The rest are:
0.0% id, 24.5% wa, 5.7% hi, 6.9% si

id - idle, but i can't realise what are others

http://neptune.homelinux.com:6060/ot...load-3hour.png
 
Old 01-27-2005, 11:24 PM   #11
NeptunEz
Member
 
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52

Rep: Reputation: 15
What is
Cpu(s): 8.6% us, 4.0% sy, 0.0% ni, 0.0% id, 87.4% wa, 0.0% hi, 0.0% si ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'Uptime' system load averages miknight Linux - General 14 01-30-2008 02:28 PM
CPU Load averages and higher pings Amfohr Linux - General 2 06-09-2005 03:09 AM
Sendmail complaining about load averages nemesisza Linux - Software 1 09-17-2004 07:32 PM
uptime command for load averages CypherSurfer Debian 2 07-14-2004 10:14 PM
BitTorrent seeding / load averages fr0zen Linux - Software 0 01-24-2004 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration