Linux Disk and Memory

df, du, free when disks fill or RAM runs out.

  • df du
  • disk full
  • free memory
  • inodes
  • lsof

Linux Disk and Memory

df, du, free when disks fill or RAM runs out.

Commands

CommandWhat it does
df -hFilesystem usage, human readable
du -sh top dirs, sortedTop-level disk hogs
free -hRAM and swap overview
vmstat 1 5CPU, memory, IO snapshot
lsof +L1Deleted but still-open files

Example

df -h
df -i  # inodes can fill before bytes
du -sh /var/log/* | sort -h | tail

FAQ

df full but du small - why?

Deleted files held open by processes, or exhausted inodes from millions of tiny files.

Swap at 100 percent - panic?

Check what swapped and whether the OOM-killer logged victims in dmesg.

الأسئلة الشائعة

df full but du small - why?
Deleted files held open by processes, or exhausted inodes from millions of tiny files.
Swap at 100 percent - panic?
Check what swapped and whether the OOM-killer logged victims in dmesg.

Linux