Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Get CPU / System Load Average on Ubuntu Linux Gauti CPU / System Load Vidutinis Ubuntu Linux

Ubuntu linux has a rich set of commands for getting system info. Ubuntu Linux turi turtingą rinkinį komandas gauti informacijos apie sistemą. One of the useful pieces of information that a system administrator might need is to know what the overall system load on a server is. Vienas naudingos informacijos gabalėlių, kad sistemos administratorius gali reikėti, turi žinoti, kas bendra sistemos apkrova ant serverio.

There are a couple of ways to get this information, which may or may not be enabled on your system. Yra daug būdų gauti šią informaciją, kurios gali arba negali būti įjungta jūsų sistema pora. It's useful to know more than one way to get the uptime information in case the commands are disabled on your shared hosting server. Tai naudinga žinoti daugiau nei vienas būdas gauti informaciją Uptime atveju komandos yra išjungtas jūsų bendras serveryje.

uptime Uptime

The uptime command gives information on system load averages for the past 1, 5, and 15 minutes: Uptime komanda pateikiama informacija apie sistemos load averages pastaruosius 1, 5 ir 15 minučių:

Example: Pavyzdys

[root@ubuntu geek]# uptime [root @ Ubuntu Geek] # uptime
05:59:07 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39 05:59:07 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0,39

w W

The w command shows who is logged on and what they are doing, including system load averages for the past 1, 5, and 15 minutes. M komanda parodo, kas yra prisijungęs ir ką jie daro, įskaitant sistemos load averages pastaruosius 1, 5 ir 15 minučių.

[root@ubuntu geek]# uptime [root @ Ubuntu Geek] # uptime
05:59:56 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39 05:59:56 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0,39
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT VARTOTOJO TTY IŠ PRISIJUNGTI @ IDLE JCPU PCPU KO
geek pts/0 192.168.1.115 6:31pm 0.00s 0.62s 0.03s /usr/sbin/sshd Geek pts / 0 192.168.1.115 6:31 0.00s 0.62s 0.03s / usr / sbin / sshd

/proc/loadavg / proc / loadavg

The /proc/loadavg file contains information on the system load. / Proc / loadavg faile yra informacija apie sistemos apkrovos. Most likely the uptime/w commands utilize this information. Greičiausiai Uptime / m komandas panaudoti šią informaciją. The first 3 values contain system load averages for the past 1, 5, and 15 minutes. Pirmieji 3 vertybės yra sistema, load averages per pastaruosius 1, 5 ir 15 minučių.

[root@ubuntu geek]# cat /proc/loadavg [root @ Ubuntu Geek] # cat / proc / loadavg
0.00 0.00 0.39 1/49 15352 0,00 0,00 0,39 1 / 49 15352

There are probably some more commands, but these are the ones off the top of my head that I know of. Tikriausiai yra šiek tiek daugiau komandų, bet jie yra ne iš mano galvos viršaus tie, kad aš žinau.

This article was originally written on 11/28/06 Tagged with: Šis straipsnis buvo parašytas ant 11/28/06 Tagged with: Ubuntu Ubuntu , , Ubuntu Tips & Tweaks Ubuntu Tips & tweaks

Daily Email Updates Dienos paštas Atnaujinimai

You can get our how-to articles in your inbox each day for free. Galite gauti mūsų kaip prie straipsnių į Jūsų pašto dėžutę kasdien nemokamai. Just enter your name and email below: Tiesiog įveskite vardą ir elektroninio pašto adresą žemiau:


Name: Vardas:
Email: Paštas:

Comments (5) Komentarai (5)

  1. netking netking

    there's also the top command Yra taip pat viršuje komanda ;-)

  2. oliver Oliver

    Hi, Labas,
    do you know how to get the load on each processor on a server. Ar žinote, kaip gauti ant kiekvieno serverio procesoriaus apkrova. Not the global load but the specific one ? Ne pasaulio apkrova, bet specifinis?
    thx for the answer thx for answer

  3. Steve Steve

    I know top can give you the usage for each core. Žinau viršuje suteikia jums už kiekvieną pagrindinę naudojimo. I'm not sure if it does it out of the box, or if there's any special configuration required. Nesu tikras, jei jis to out of the box, arba jei yra bet kokios specialios konfigūracijos nereikia.

    1787 processes: 1782 sleeping, 2 running, 3 zombie, 0 stopped 1.787 procesus: 1782 miega, 2 paleista, 3 zombie, 0 sustojo
    CPU0 states: 7.0% user 5.1% system 0.0% nice 0.0% iowait 87.0% idle CPU0 narių: 7.0% Vartotojo 5,1% sistemos 0.0% nice 0,0% iowait 87,0% idle
    CPU1 states: 18.1% user 1.0% system 0.0% nice 0.0% iowait 80.0% idle CPU1 narių: 18,1% Vartotojo 1,0% sistemos 0.0% nice 0,0% iowait 80.0% idle
    CPU2 states: 33.1% user 0.1% system 0.0% nice 0.0% iowait 65.0% idle CPU2 narių: 33,1% Vartotojo 0,1% sistemos 0.0% nice 0,0% iowait 65.0% idle
    CPU3 states: 40.0% user 2.0% system 0.0% nice 0.0% iowait 57.0% idle CPU3 narių: 40,0% Vartotojo 2,0% sistemos 0.0% nice 0,0% iowait 57.0% idle
    CPU4 states: 7.1% user 0.1% system 0.0% nice 3.0% iowait 88.0% idle CPU4 narių: 7.1% Vartotojo 0,1% sistemos 0.0% nice 3,0% iowait 88,0% idle
    CPU5 states: 7.1% user 29.0% system 0.0% nice 0.0% iowait 62.1% idle CPU5 narių: 7.1% Vartotojo 29,0% System 0.0% nice 0,0% iowait 62,1% idle
    CPU6 states: 25.1% user 1.0% system 0.0% nice 0.0% iowait 72.1% idle CPU6 narių: 25,1% Vartotojo 1,0% sistemos 0.0% nice 0,0% iowait 72.1% idle
    CPU7 states: 16.0% user 0.1% system 0.0% nice 0.0% iowait 83.0% idle CPU7 narių: 16,0% Vartotojo 0,1% sistemos 0.0% nice 0,0% iowait 83,0% idle

    For example this would be shown right at the top for a multi-core system. Pavyzdžiui, tai galėtų būti įrodyta, dešinėn dėl multi-core sistemą viršuje.

  4. Bob Bob

    You can use the grep command to monitor the CPU load average: Galite naudoti komandą grep stebėti procesoriaus apkrova vidurkis:

    top -b | grep -2 “load average” top-a | grep -2 "apkrovos vidutinės"

  5. brainextender brainextender

    I'ma little curious how to get the load of a single core from the /proc file system? Aš truputį smalsu, kaip patekti į vieną pagrindinių iš / proc file system load?


Leave a Comment Palikite komentarą




Leave your Palikite friendly draugiškas comment here. komentarus.

If you have a computer help question, Jei turite kompiuteryje Pagalba klausimą, click here to leave it on the forums Spauskite čia, jei norite palikti jį dėl forumai instead. vietoj.

Note: Your comment may not show up immediately on the site. Pastaba: Jūsų komentaras gali būti rodomas iš karto svetainėje.

Our Friends Mūsų draugai
Getting Started Paruo


About How-To Geek Apie How-To Geek
What Is That Process? Kas yra šis procesas?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe Ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.