Get CPU / System Load Average on Ubuntu Linux Pobierz CPU / System Średnie obciążenie na Ubuntu Linux
Ubuntu linux has a rich set of commands for getting system info. Ubuntu Linux posiada bogaty zestaw poleceń na uzyskanie informacji systemu. 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. Jednym z elementów przydatnych informacji, które administrator systemu może być konieczne jest, aby wiedzieć, co ogólne obciążenie systemu na serwer.
There are a couple of ways to get this information, which may or may not be enabled on your system. Istnieje kilka sposobów, aby uzyskać te informacje, które mogą lub nie mogą być aktywne w systemie. 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. Warto wiedzieć więcej niż jeden sposób, aby uzyskać informacje uptime w przypadku polecenia są wyłączone na współdzielonych hosting serwera.
uptime Uptime
The uptime command gives information on system load averages for the past 1, 5, and 15 minutes: Uptime polecenia podaje informacje o średnie obciążenie systemu minut po 1, 5 i 15:
Example: Przykład:
[root@ubuntu geek]# uptime [root @ geek Ubuntu] # uptime
05:59:07 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39 05:59:07 up 87 dni, 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. Polecenia w pokazuje kto jest zalogowany i co robią, w tym średnie obciążenie systemu minut po 1, 5 i 15.
[root@ubuntu geek]# uptime [root @ geek Ubuntu] # uptime
05:59:56 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39 05:59:56 up 87 dni, 13:13, 1 user, load average: 0.00, 0.00, 0.39
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT USER TTY FROM LOGIN @ IDLE JCPU PCPU CO
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 pm 0.00s 0.62s 0.03s / usr / sbin / sshd
/proc/loadavg / proc / buty
The /proc/loadavg file contains information on the system load. / Proc / buty plik zawiera informacje na temat obciążenia systemu. Most likely the uptime/w commands utilize this information. Najprawdopodobniej uptime / polecenia w wykorzystać te informacje. The first 3 values contain system load averages for the past 1, 5, and 15 minutes. Pierwsze 3 zawiera wartości średnie obciążenie systemu minut po 1, 5 i 15.
[root@ubuntu geek]# cat /proc/loadavg [root @ geek Ubuntu] # cat / proc / buty
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. Prawdopodobnie jest kilka poleceń, ale są te z góry na głowę, że znam.

Daily Email Updates Daily Email Updates
You can get our how-to articles in your inbox each day for free. Możesz pobrać nasze instrukcje postępowania w skrzynce odbiorczej codziennie za darmo. Just enter your name and email below: Wystarczy podać swoje imię i adres e-mail:



there's also the top command Istnieje także najlepsze polecenia
Hi, Cześć,
do you know how to get the load on each processor on a server. wiesz jak uzyskać obciążenie dla każdego procesora na serwerze. Not the global load but the specific one ? Nie globalnego obciążenia, ale specyficzny?
thx for the answer thx za odpowiedzi
I know top can give you the usage for each core. Wiem, że najlepsze może dać ci korzystania dla każdego rdzenia. I'm not sure if it does it out of the box, or if there's any special configuration required. Ja Nie wiem czy to po wyjęciu z pudełka, lub jeśli nie ma żadnych specjalnych konfiguracji wymaganej.
1787 processes: 1782 sleeping, 2 running, 3 zombie, 0 stopped 1787 procesy: 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 CPU0 stanowi: 7.0% 5.1% użytkowników systemu 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 stanowi: 18,1% 1,0% użytkowników systemu 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 stanowi: 33,1% 0,1% użytkowników systemu 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 stanowi: 40,0% 2,0% użytkowników systemu 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 stanowi: 7.1% 0.1% użytkowników systemu 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 stanowi: 7.1% 29.0% użytkowników systemu 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 stanowi: 25,1% 1,0% użytkowników systemu 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 stanowi: 16,0% 0,1% użytkowników systemu 0.0% nice 0,0 iowait% 83.0% idle
For example this would be shown right at the top for a multi-core system. Na przykład będzie to widoczne na pierwszym miejscu dla wielu system podstawowy.
You can use the grep command to monitor the CPU load average: Możesz użyć polecenia grep do monitorowania średnie obciążenie procesora:
top -b | grep -2 “load average” top-b | grep -2 "load average"
I'ma little curious how to get the load of a single core from the /proc file system? Jestem trochę ciekaw, jak uzyskać obciążenie pojedynczy rdzeń z system plików / proc?