Command-Line Tools for Monitoring Swap in Debian
free -h to display totals in a human-readable format (e.g., GB/MB). It shows swap capacity, used space, and free space alongside memory stats.top is a real-time system monitor that includes a “Swap” line with total, used, and free swap values. htop (install via sudo apt install htop) offers a more intuitive interface with color-coded metrics and keyboard navigation for detailed swap insights.vmstat -s | grep swap to extract swap-specific data (total, used, free) or vmstat 1 to refresh stats every second for live monitoring.sudo swapon --show for accurate, up-to-date information.sysstat package (install via sudo apt install sysstat), it collects historical and real-time system activity data. Use sar -r 1 to view swap usage every second (replace 1 with your desired interval).Graphical Tools for Swap Monitoring in Debian
top) and are suitable for users preferring a graphical interface. Install via sudo apt install gnome-system-monitor (Debian default) or sudo apt install kde-system-monitor (KDE users).~/.conkyrc file to show swap usage (e.g., ${swap}M for used swap in MB). Install via sudo apt install conky.docker pull sqshq/sampler, configure it to query swap data (via free -m), and set up Grafana to visualize trends over time.sudo apt install netdata and access it at http://your-server-ip:19999. It provides live swap usage charts and alerts for abnormal activity.