Disk Usage issues
#Disk_Usage #Linux #AIX #IBM #System_Admin #Redhat #AIX

Disk Usage issues

Disk Usage

df reports disk space on filesystems:

df --help

du reports disk usage of directory contents:

du --help

ncdu reports disk usage of directory contents in a gui-like ncurses interface, and allows sorting:

ncdu -h

Troubleshooting

Report disk usage on all filesystems

df -h

Analyze disk usage of a directory

With ncdu use s key to toggle ascending and descending sort by size. For example, report disk usage for the root directory:

ncdu /

Unlike ncdu, the output from du is not sorted, and if a directory has a lot of content then the output can be unwieldy. However, the output can be tamed with a bit of help from grep, sort and head.

For example, show human readable totals for subdirectories that are taking up gigabytes of space in root directory, and reverse sort by number; use -a to include the files in the directory, -h for human readable, and -x to skip directories on different filesystems:

du -hax --max-depth=1 / | grep '[0-9]G' | sort -nr

Rather than manually drilling down through each directory in turn, an alternative approach is to analyze the files in each directory, ignoring the subdirectories. For example, to find out which directories are the largest by just counting the size of their files; excluding the size of subdirectories (-S):

du -Sx / | sort -nr | head -n 10

To get a human readable size for an individual directory:

du -hs /tmp

another solution that you may find open files as we mentioned before in previous post about lsof


you can enter the desired dire then make lsof or you can make lsof | grep deleted to catch deleted files then kill the process

要查看或添加评论,请登录

Hossam Moghazy的更多文章

  • Oracle Capsules

    Oracle Capsules

    Oracle Capsules Select statement select fields from table or tables where condation select * from employees ; select *…

  • HMC update

    HMC update

    Hello Before starting lets know Types of HMC network connections HMC to managed system Used to perform most of the…

  • Monitoring Tools #Nagios Core4.4

    Monitoring Tools #Nagios Core4.4

    One of the best free opensource is Nagios core with latest version 4.4 actually it contain a lot of features to monitor…

  • GPT As file system

    GPT As file system

    GPT’s solution Intel? created the GPT definition as part of its Extensible Firmware Interface (EFI) specification for a…

  • OpenShift Container Platform

    OpenShift Container Platform

    OpenShift Container Platform OpenShift container platform is an enterprise platform which helps multiple teams such as…

  • Nmon

    Nmon

    Hello did you know what is nmon nmon stand for Nigel's Monitoring tool its a tool for both Aix and Linux OS it can let…

    1 条评论
  • Monitoring AIX Using SNMP

    Monitoring AIX Using SNMP

    To stop the daemons, execute the following as root: stopsrc -s aixmibd stopsrc -s hostmibd stopsrc -s snmpmibd stopsrc…

  • HTTPS with Ambari for Nagios

    HTTPS with Ambari for Nagios

    Hello guys have you thinked before to use ambari :) its not a kidding name its a server package here you can use it to…

  • Network Interface in Red-hat

    Network Interface in Red-hat

    Before starting you should understand that everything is a file even a device is a file so lets see how we can open…

  • HMC useful commands

    HMC useful commands

    HMC useful commands lshmc -v Shows vital product data, such as the serial number. lshmc -V Shows the release of the HMC.

社区洞察

其他会员也浏览了