Evaluate Disk Usage on Linux Plesk Server

The following commands will assist you in evaluating your disk usage on a Linux Server with Plesk.

  • Get overview of available and used space

    df -h

    linux_diskoverview

    On this server the primary partition /dev/sda3 is using 12Gb out of the 21Gb allocation

  • Get a break-down of each root level folders usage

    du -hs /*

    linux_diskrootbreakdown

  • Show top 5 root level folders by disk usage

    du -sm /* | sort -rn | head -n 5

    linux_disktop5rootlevel

    On this server /var /root and /usr combine to about 11Gb

  • You will generally find a majority of disk space that can be freed up in logs.

  • Find Site Logs Over 10Mb

    find /var/www/vhosts/*/statistics/logs/* -size +10M -exec ls -lh {} \; | awk '{print $5 , $9}'

    linux_disksitelogs

    Image Truncated for Fitment

    On this server we have found just over 2Gb of site logs.

  • Delete Site Logs Over 10Mb

    find /var/www/vhosts/*/statistics/logs/* -size +10M -exec rm -f {} \;

  • Find Server Logs Over 10Mb

    find /var/log/* -size +10M -exec ls -lh {} \; | awk '{print $5 , $9}'

    linux_diskserverlogs

    On this server we have found a single log /var/log/btmp that is 532Mb.

  • Delete Server Logs Over 10Mb

    find /var/log/* -size +10M -exec rm -f {} \;

  • Find Mail Logs Over 10Mb

    find /usr/local/psa/var/log/* -size +10M -exec ls -lh {} \; | awk '{print $5 , $9}'

    linux_diskmaillogs

    On this server we have found just over 120Mb of mail logs.

  • Delete Mail Logs Over 10Mb

    find /usr/local/psa/var/log/* -size +10M -exec rm -f {} \;

  • Show disk usage for each site

    du -sm /var/www/vhosts/*/httpdocs | sort -rn

    linux_diskpersite

    This server is hosting just under 2Gb of non-secure site content.

  • On this server we have managed to free just over 2.5Gb

    df -h

    linux_diskusagenow

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Installing htop

htop is an interactive process viewer for Linux, which is a powerful alternative to the...

Bind Multiple IP Addresses to a Single Network Interface Card (NIC)

This tutorial demonstrates how to bind multiple IP addresses to a single NICI'll be using LAN...

Clear Memory Cache on Linux Server

By default the Linux OS has a very efficient memory management process that should be freeing any...

Set the time on a Linux server

Log into the server via SSHAt the shell prompt run the following command:date MMDDHHmmYYYYFor...

Check your disk usage in Linux

A good way to check your disk usage for folders on your Linux server is via shell.Download...