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 Obtenir de CPU / Sistema de càrrega mitjana en Ubuntu Linux

Ubuntu linux has a rich set of commands for getting system info. Linux Ubuntu té un ric conjunt d'ordres per a obtenir informació del sistema. 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. Una de les peces útils d'informació que un administrador del sistema que necessita és saber el que la càrrega global del sistema en un servidor és.

There are a couple of ways to get this information, which may or may not be enabled on your system. Hi ha un parell de maneres d'obtenir aquesta informació, que pot o no pot ser habilitat al vostre sistema. 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. És útil per saber més d'una forma d'obtenir la informació de temps d'activitat en cas que els comandaments estan desactivades seu servidor d'allotjament compartit.

uptime temps d'activitat

The uptime command gives information on system load averages for the past 1, 5, and 15 minutes: La comanda proporciona informació sobre el temps d'activitat mitjana de la càrrega del sistema per als últims minuts 1, 5, i 15:

Example: Exemple:

[root@ubuntu geek]# uptime [root @ Ubuntu Geek] Data #
05:59:07 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39 05:59:07 fins a 87 dies, 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. La comanda w mostra qui està connectat i el que estan fent, com a mitjana de càrrega del sistema per l'acta de l'1, 5, i 15.

[root@ubuntu geek]# uptime [root @ Ubuntu Geek] Data #
05:59:56 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39 05:59:56 fins a 87 dies, 13:13, 1 user, load average: 0,00, 0,00, 0,39
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT De l'inici de sessió d'usuari TTY @ IDLE JCPU Pcpu QUÈ
geek pts/0 192.168.1.115 6:31pm 0.00s 0.62s 0.03s /usr/sbin/sshd pts geek / 0 192.168.1.115 6:31 pm 0.00s 0.62s 0.03s / usr / sbin / sshd

/proc/loadavg / Proc / loadavg

The /proc/loadavg file contains information on the system load. El fitxer / proc / loadavg conté informació sobre la càrrega del sistema. Most likely the uptime/w commands utilize this information. El més probable és el temps d'activitat / w utilitzar els comandaments d'aquesta informació. The first 3 values contain system load averages for the past 1, 5, and 15 minutes. Els 3 primers contenen els valors promig de càrrega del sistema per els últims minuts 1, 5, i 15.

[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. És probable que hi hagi més comandes, però aquests són els de la part superior del meu cap, que jo sàpiga.

This article was originally written on 11/28/06 Tagged with: Aquest article va ser originalment escrit en 11/28/06 Tagged amb: Ubuntu Ubuntu , , Ubuntu Tips & Tweaks Ubuntu Tips & Tweaks

Daily Email Updates Daily Email Updates

You can get our how-to articles in your inbox each day for free. Vostè pot obtenir el nostre com-als articles a la teva safata d'entrada cada dia de forma gratuïta. Just enter your name and email below: Només cal que introdueixis el teu nom i correu electrònic a continuació:


Name: Nom:
Email: Email:

Comments (5) Comentaris (5)

  1. netking netking

    there's also the top command també està la comanda top ;-)

  2. oliver Oliver

    Hi, Hola,
    do you know how to get the load on each processor on a server. Saps com aconseguir la càrrega en cada processador en un servidor. Not the global load but the specific one ? No és la càrrega global, però l'específic?
    thx for the answer thx per la resposta

  3. Steve Steve

    I know top can give you the usage for each core. Sigues part superior pot donar-li l'ús per a cada nucli. I'm not sure if it does it out of the box, or if there's any special configuration required. No estic segur de si ho fa fora de la caixa, o si hi ha alguna configuració especial.

    1787 processes: 1782 sleeping, 2 running, 3 zombie, 0 stopped 1.787 processos: 1782 sleeping, 2 running, 3 zombie, 0 stopped
    CPU0 states: 7.0% user 5.1% system 0.0% nice 0.0% iowait 87.0% idle Estats CPU0: 7,0% user Sistema 5.1% 0,0% nice iowait 0,0% 87,0% idle
    CPU1 states: 18.1% user 1.0% system 0.0% nice 0.0% iowait 80.0% idle Estats CPU1: 18,1% d'usuaris del sistema 1,0% 0,0% nice iowait 0,0% 80,0% d'inactivitat
    CPU2 states: 33.1% user 0.1% system 0.0% nice 0.0% iowait 65.0% idle Estats CPU2: 33.1% user 0,1% system 0,0% nice iowait 0,0% 65,0% idle
    CPU3 states: 40.0% user 2.0% system 0.0% nice 0.0% iowait 57.0% idle Estats CPU3: 40.0% user 2.0% system 0,0% nice iowait 0,0% 57,0% idle
    CPU4 states: 7.1% user 0.1% system 0.0% nice 3.0% iowait 88.0% idle Estats CPU4: 7.1% user 0,1% system 0,0% nice iowait 3,0% 88,0% idle
    CPU5 states: 7.1% user 29.0% system 0.0% nice 0.0% iowait 62.1% idle Estats CPU5: 7.1% user 29.0% system 0,0% nice iowait 0,0% 62,1% idle
    CPU6 states: 25.1% user 1.0% system 0.0% nice 0.0% iowait 72.1% idle Estats CPU6: 25,1% d'usuaris del sistema 1,0% 0,0% nice 0,0% iowait 72,1% d'inactivitat
    CPU7 states: 16.0% user 0.1% system 0.0% nice 0.0% iowait 83.0% idle CPU7 estats: 16,0% d'usuaris del sistema 0,1% 0,0% nice iowait 0,0% 83,0% idle

    For example this would be shown right at the top for a multi-core system. Per exemple, aquest es mostra a la dreta a la part superior d'un sistema multi-nucli.

  4. Bob Bob

    You can use the grep command to monitor the CPU load average: Vostè pot utilitzar la comanda grep per supervisar la mitjana de càrrega de CPU:

    top -b | grep -2 “load average” top-b | grep -2 "càrrega mitjana"

  5. brainextender brainextender

    I'ma little curious how to get the load of a single core from the /proc file system? Estic una mica curiós com obtenir la càrrega d'un sol nucli de sistema de fitxers / proc?


Our Friends Els nostres Amics
Getting Started Com començar


About How-To Geek Sobre How-To Geek
What Is That Process? Què és aquest procés?
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 Jusched.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. Tots els drets reservats.