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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-10-2004, 08:11 AM
|
#1
|
Member
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420
Rep:
|
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
|
|
|
08-10-2004, 10:12 AM
|
#2
|
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142
Rep:
|
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.
|
|
|
11-26-2004, 04:39 PM
|
#3
|
Member
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52
Rep:
|
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.
|
|
|
11-26-2004, 10:35 PM
|
#4
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
11-27-2004, 06:42 AM
|
#5
|
Member
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365
Rep:
|
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;
}
|
|
|
01-06-2005, 03:07 PM
|
#6
|
Member
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52
Rep:
|
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?
|
|
|
01-06-2005, 03:15 PM
|
#7
|
Member
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365
Rep:
|
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
|
|
|
01-06-2005, 04:05 PM
|
#8
|
Member
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52
Rep:
|
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
|
|
|
01-06-2005, 04:40 PM
|
#9
|
Member
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365
Rep:
|
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%.
|
|
|
01-06-2005, 04:47 PM
|
#10
|
Member
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52
Rep:
|
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
|
|
|
01-27-2005, 11:24 PM
|
#11
|
Member
Registered: Dec 2003
Location: Russia, Moscow
Distribution: Fedora Core 4
Posts: 52
Rep:
|
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 ?
|
|
|
All times are GMT -5. The time now is 07:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|