# Swaptop A real-time swap usage monitor for Linux and Windows systems with TUI interface. Lists processes using swap, displays consumption per-process/per-software, and provides live-updating graphs.  [](https://crates.io/crates/swaptop)  > [!TIP] > Blog post about this project: https://blog.wired.rs/posts/swaptop ## Features - Real-time animated swap usage graph - List Swap devices with usage per disk / type - Process-level swap consumption tracking - Grouped view by software (aggregate mode) - Multiple color themes (Dracula, Solarized, Monokai, Nord) - Unit conversion (KB/MB/GB) - Lightweight (<5MB memory usage) ## Installation ### Linux ### Prerequisites - [Rust (latest stable)](https://rustup.rs/) - Linux kernel 4.4+ - procfs mounted at `/proc` ```bash cargo install swaptop ``` ### Windows - Acess: https://github.com/luis-ota/swaptop/releases - Download the windows verison - Extract it - Execute the .exe or call it from a terminal ## Usage ### Basic Launch ```bash swaptop ``` ### Keyboard Controls | Key | Action | |-------------|------------------------------| | `q`/`Esc` | Quit application | | `k`/`m`/`g` | Switch units (KB/MB/GB) | | `h` | Hide / Show swap devices | | `a` | Toggle aggregate mode | | `t` | Cycle through themes | | `↑`/`u` | Scroll up | | `↓`/`d` | Scroll down | | `Home` | Go to list start | | `End` | Go to list end | | `PgUp` | One page up | | `PgDown` | One page down | | `Ctrl+C` | Force quit | | `< / >` | Decrease / Increase interval |  ## Themes Cycle through 5 beautiful themes: 1. Dracula (default) 2. Solarized 3. Monokai 4. Nord 5. Default Press `t` to cycle themes live.  ## Technical Details ### Data Collection - Reads `/proc/meminfo` for system swap stats - Parses `/proc/[pid]/status` for per-process swap - Uses procfs crate for safe access ### Performance - Updates every 1 second by default - <1% CPU usage on modern systems - Memory footprint: ~4MB ## Troubleshooting **No swap data showing?** - Ensure you have active swap partitions/files ```bash swapon --show ``` **Permission issues?** Run with: ```bash sudo -E swaptop ``` ## Contributors
|
luis |
kpcyrd |
Rafael Chicovis |