fbpx

Load Averages on Ubuntu

photo of clouds during daytime

Many times you check your Ubuntu server and you see high load averages.

First number is 1 minute average, second one is 5 minute average and third one is 15 minute average.

~/backup# uptime
11:09:31 up 40 days, 17:38, 2 users, load average: 1.01, 0.66, 0.47
~/backup# cat /proc/loadavg
0.40 0.54 0.44 1/255 30135

Some interpretations:

  • If the averages are 0.0, then your system is idle.
  • If the 1 minute average is higher than the 5 or 15 minute averages, then load is increasing.
  • If the 1 minute average is lower than the 5 or 15 minute averages, then load is decreasing.
  • If they are higher than your CPU count, then you might have a performance problem (it depends).

What it means on Linux or Ubuntu is this:

On Linux, load averages are (or try to be) “system load averages“, for the  system as a whole, measuring the number of threads that are working and waiting to work (CPU, disk, uninterruptible locks). Put differently, it measures the number of threads that aren’t completely idle. Advantage: includes demand for different resources.

Continue reading “Load Averages on Ubuntu”

Ubuntu Disk Space Occupied

person on top of a hill

When you run low on space on your disks and you don’t know what is going, then you should start investigating to see what files you can remove.

If you want to check how much space is left in your Ubuntu server then you can use this command:

/var/www# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 27G 7.9G 17G 32% /
devtmpfs 2.0G 0 2.0G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 205M 1.8G 11% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda2 10G 2.1G 7.4G 22% /home
tmpfs 393M 0 393M 0% /run/user/0
/var/www#

The command above gives you a global overview, but if you want to dig deeper to get more details then follow the next section.

If you want to check the space occupied by each folder then this is the command you need

/var/www# du -h --max-depth=1