Skip to main content
In this guide, you’ll learn how to monitor and verify the integrity of key resources on Linux servers. We cover disk and directory usage, memory and CPU statistics, file system repair (XFS and ext4), and service health checks.

Disk Space Usage

Over time, server storage fills up as applications grow and users store more data. Use df to inspect overall disk usage:
For human-readable output (MB, GB, …), add the -h flag:
Ignore tmpfs entries—they represent in-memory filesystems, not physical disks.

Directory Usage

To measure the size of a specific directory, run du with summarization and human-readable flags:
Running du on very large or deeply nested directories can take time and generate high I/O.

Memory Utilization

Display RAM and swap usage with free:
Focus on the available column—it indicates memory ready for new applications.

CPU Load and Hardware Details

Load Averages

Use uptime to view load averages over 1, 5, and 15 minutes:
  • On a single-core system, load of 1.00 equates to 100% utilization.
  • On an 8-core system, a load of 6.00 means six cores were fully busy.

CPU Architecture

Key fields:
• Architecture
• CPU(s)
• Thread(s) per core
• Model name
• Cache sizes

PCI Devices

Lists all PCI devices, including network adapters, GPUs, and host bridges.

File System Integrity

Repairing an XFS File System

  1. Unmount the partition:
    sudo umount /dev/vdb1
  2. Repair with verbose output:
  3. Remount after completion:
    sudo mount /dev/vdb1 /mnt
Always unmount the XFS volume before running xfs_repair to avoid data corruption.

Checking and Repairing an ext4 File System

Run fsck.ext4 with verbose, forced check, and preen (auto-fix simple issues):
  • -v: verbose output
  • -f: force check even if clean
  • -p: preen mode for unattended fixes
Do not run fsck on a mounted ext4 partition, especially the root (/), as it may cause data loss.

Monitoring Key Processes

List all service dependencies and their statuses with systemctl:
  • = running
  • = stopped
Example: simulate stopping NTP service, verify, then restart:

Command Summary

Watch Video

Practice Lab