Evaluar el uso de disco en Linux Servidor Plesk

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

    • Get overview of available and used spacedf -hlinux_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 usagedu -hs /*linux_diskrootbreakdown
    • Show top 5 root level folders by disk usagedu -sm /* | sort -rn | head -n 5linux_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 10Mbfind /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 10Mbfind /var/www/vhosts/*/statistics/logs/* -size +10M -exec rm -f {} \;
  • Find Server Logs Over 10Mbfind /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 10Mbfind /var/log/* -size +10M -exec rm -f {} \;
  • Find Mail Logs Over 10Mbfind /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 10Mbfind /usr/local/psa/var/log/* -size +10M -exec rm -f {} \;
  • Show disk usage for each sitedu -sm /var/www/vhosts/*/httpdocs | sort -rnlinux_diskpersite

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

  • On this server we have managed to free just over 2.5Gbdf -hlinux_diskusagenow

 

 

FUENTE: http://www.hosting.com/support/linux/evaluate-disk-usage-on-linux-plesk-server