How to check server load average via SSH?

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
604
Points
28
Normally I see server load average via my hosting control panel but it is possible to check Server Load average via SSH? please share commands to check if you know!

Kaz
 

tuxandrew

Well-known member
Registered
Joined
Aug 19, 2012
Messages
126
Points
18
Yup, you can!!

The 'w' and 'cat /proc/loadaverage' gives static results.

root@Quantum-Computer:~$ w
11:32:59 up 1:27, 1 user, load average: 1.30, 0.66, 0.47
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 :0 10:07 ?xdm? 5:28 0.01s /usr/lib/gdm3/g
----------------------------------------------------------------------------------------------------------
root@Quantum-Computer:~$ cat /proc/loadavg
1.05 0.65 0.47 2/1002 17905
root@Quantum-Computer:~$
----------------------------------------------------------------------------------------------------------

For dynamic and more informative results you can use 'top -c' .

root@Quantum-Computer:~$ top -c
top - 11:50:26 up 1:44, 1 user, load average: 0.77, 0.63, 0.65
Tasks: 290 total, 2 running, 235 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.5 us, 2.4 sy, 0.0 ni, 89.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3935120 total, 210620 free, 2286616 used, 1437884 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 1051160 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16962 root 20 0 2731864 257116 125972 R 18.5 6.5 5:14.55 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen+
16571 root 20 0 3744412 343672 148292 S 9.9 8.7 8:53.16 /usr/lib/firefox/firefox -new-window
2860 root 20 0 3909860 215352 96824 S 5.3 5.5 3:21.84 /usr/bin/gnome-shell
2703 root 20 0 785180 72160 55716 S 5.0 1.8 2:30.12 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority +
17881 root 20 0 728244 37076 27796 S 4.0 0.9 0:03.06 /usr/lib/gnome-terminal/gnome-terminal-server
2883 root 9 -11 2914508 15604 11524 S 1.7 0.4 4:06.27 /usr/bin/pulseaudio --start --log-target=syslog
 
Last edited:

Chris Worner

Well-known member
Registered
Joined
Apr 15, 2016
Messages
612
Points
28
Chris Worner
What load average is consider as consuming 50% our server resource? or how to calculate load average is high load or acceptable?
 

tuxandrew

Well-known member
Registered
Joined
Aug 19, 2012
Messages
126
Points
18
tuxandrew
The dynamic result of the TOP command shows the % of CPU and % of Memory consumed by each processes running in the server.

Generally server stabilized at the load average of '0 to 1', but it depends on the running applications and server performance the results would differ on production servers.
 

tuxandrew

Well-known member
Registered
Joined
Aug 19, 2012
Messages
126
Points
18
tuxandrew
The server can tolerate the load depends on its hardware specification they have and the server crash happens when CPu and Memory usage exceed its capacity. If the server should handle high incoming traffic, it should have that much free memory as well as CPu capacity.

Since you mentioned you have the loadavearge 10 to 24, it is fine if it happens at peak hours and the server will not crash if you have enough free memory and CPu to handle the load as well as incoming traffic at that time.

If the load average is same through out always, and you felt weird about it, then it should be investigated. And it can happen in following conditions.

1. An unoptimized application or database may cause high load average on the server[due to high CPu and memory usage].
2.Any read/write issue with the Operating System or the Hard disk may cause such problem.
3.Any DOS/DDOS/ attacks on server vulnerabilities can create such conditions.
 
Last edited:

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
604
Points
28
Yup, you can!!

The 'w' and 'cat /proc/loadaverage' gives static results.

root@Quantum-Computer:~$ w
11:32:59 up 1:27, 1 user, load average: 1.30, 0.66, 0.47
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 :0 10:07 ?xdm? 5:28 0.01s /usr/lib/gdm3/g
----------------------------------------------------------------------------------------------------------
root@Quantum-Computer:~$ cat /proc/loadavg
1.05 0.65 0.47 2/1002 17905
root@Quantum-Computer:~$
----------------------------------------------------------------------------------------------------------

For dynamic and more informative results you can use 'top -c' .

root@Quantum-Computer:~$ top -c
top - 11:50:26 up 1:44, 1 user, load average: 0.77, 0.63, 0.65
Tasks: 290 total, 2 running, 235 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.5 us, 2.4 sy, 0.0 ni, 89.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3935120 total, 210620 free, 2286616 used, 1437884 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 1051160 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16962 root 20 0 2731864 257116 125972 R 18.5 6.5 5:14.55 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen+
16571 root 20 0 3744412 343672 148292 S 9.9 8.7 8:53.16 /usr/lib/firefox/firefox -new-window
2860 root 20 0 3909860 215352 96824 S 5.3 5.5 3:21.84 /usr/bin/gnome-shell
2703 root 20 0 785180 72160 55716 S 5.0 1.8 2:30.12 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority +
17881 root 20 0 728244 37076 27796 S 4.0 0.9 0:03.06 /usr/lib/gnome-terminal/gnome-terminal-server
2883 root 9 -11 2914508 15604 11524 S 1.7 0.4 4:06.27 /usr/bin/pulseaudio --start --log-target=syslog
Install network monitoring in your linux OS via putty
Both are good man and I have not ever tried them, thanks for sharing, I will try to install both and see how my server load average is.
 
Similar Threads
Replies
13
Views
3,099
Replies
15
Views
3,785
Replies
1
Views
1,890

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top