Sobes.tech
Junior — Middle

What methods can be used to determine disk space usage and active load on Linux systems?

sobes.tech AI

Answer from AI

In Linux, the following methods and commands can be used to determine the degree of disk usage and activity:

  • df — shows disk space usage by filesystem:

    df -h
    

    Displays size, used, and available space in a human-readable format.

  • du — estimates the size of specific directories or files:

    du -sh /path/to/directory
    
  • iostat (from the sysstat package) — shows input/output statistics, including disk load:

    iostat -dx 1 3
    

    Allows you to see how actively the disk is being used.

  • iotop — interactive process monitoring that shows real-time disk usage:

    sudo iotop
    
  • lsblk — displays information about block devices and their usage.

  • smartctl (from the smartmontools package) — used for checking disk health and diagnostics.

These tools allow you to assess both the current disk load and the degree of its fill.