When we execute long-running tasks in the command line, it can be challenging to understand their real-time impact on system resources or to track their precise execution duration. Durable Run Style (druns) addresses this by providing a comprehensive terminal interface that monitors these tasks, offering insights into CPU usage, memory consumption, disk I/O, and more.
Capabilities
Durable Run Style provides the following capabilities to help you monitor and understand your command-line tasks:
- Execution Time: Tracks the precise duration from the start to the completion of your command, offering a clear understanding of its overall runtime.
- CPU Usage: Displays real-time CPU utilization, allowing you to observe how intensely your command is using the processor.
- Memory Usage: Shows current memory consumption, which is crucial for identifying memory leaks or inefficient resource allocation.
- Disk I/O: Monitors read and write operations to disk, providing insights into how much data your command is processing or storing.
- Process Status: Indicates the current state of the monitored process (e.g., running, completed, or failed), giving you immediate feedback on its lifecycle.
- Command Output: Captures and displays the command’s standard output and error streams in real-time, ensuring you see both the results and any messages generated.
- Configurable Display: Allows customization of the terminal interface layout to suit your preferences and focus on the most relevant metrics.
- Network Usage (Experimental): Tracks network activity during command execution, which can be valuable for commands that interact with remote services or transfer data.
Installation
Via Cargo (Recommended)
We recommend installing druns via Cargo, Rust’s package manager, because it ensures you get the latest stable version directly from the source, leveraging Rust’s robust build system for optimal performance and compatibility with your system.
cargo install --git https://github.com/durableprogramming/durable-run-style.git
From Pre-built Binaries
Download the latest release from the releases page.
From Source
git clone https://github.com/durableprogramming/durable-run-style.git
cd durable-run-style
cargo build --release
The binary will be available at target/release/druns.
Usage
Basic Usage
To monitor any command, you can prefix it with druns. For instance, if you want to observe the resource usage and execution time of a simple ls -la command, you would run:
druns ls -la
When you execute this, druns will launch ls -la and present a terminal interface. You will see real-time updates on CPU and memory consumption, disk I/O, and the elapsed time for the ls -la command. The output of ls -la itself will be streamed directly within the druns interface, allowing you to see both the command’s results and its system impact simultaneously.
Development Workflows
druns can be particularly useful for monitoring long-running development tasks, helping you identify performance bottlenecks or unexpected resource spikes. This allows you to gain insights into the efficiency of your build processes, test suites, or local development servers.
# Watch Docker Compose services to understand their resource footprint
druns docker compose up
# Run test suites and observe their execution time and resource usage
druns cargo test
# Build projects and monitor compilation times and resource demands
druns npm run build
System Tasks
For intensive system operations, druns provides visibility into their impact, enabling you to track resource usage and ensure tasks complete within expected parameters. This is crucial for understanding the system load imposed by various maintenance or data processing jobs.
# Monitor database migrations for resource consumption and duration
druns rails db:migrate
# Track video encoding processes to optimize performance
druns ffmpeg -i input.mp4 output.mp4
# Observe data processing scripts for memory and CPU usage
druns python process_data.py
Demo
Try the graphics demo to see the interface:
druns gfx-demo
What It Monitors
- Execution Time: Precise duration tracking from start to finish
- CPU Usage: Real-time CPU utilization percentage
- Memory Usage: Current memory consumption
- Disk I/O: Read and write operations
- Process Status: Running, completed, or failed states
- Command Output: Live output streaming
- Network Usage (Experimental): Network activity monitoring
Practical Applications
druns offers valuable insights across various scenarios where understanding the behavior and resource consumption of command-line tasks is critical:
- CI/CD Pipelines: Integrate
drunsinto your build and deployment scripts to monitor resource usage, helping you optimize pipeline efficiency and detect anomalies. - Development: Track compilation times, test suite execution, and local server resource consumption to identify performance bottlenecks and improve development feedback loops.
- System Administration: Observe the system impact of maintenance tasks, backups, or other intensive operations to ensure stability and efficient resource allocation.
- Data Processing: Monitor long-running data analysis or transformation jobs to understand their resource footprint and optimize their execution.
- Container Management: Gain visibility into Docker and other container operations, helping you diagnose performance issues within your containerized environments.
- Testing: Enhance your testing workflows by tracking test suite execution with detailed metrics, providing a clearer picture of test performance and resource demands.
Philosophy
Durable Run Style is built on principles that prioritize practical understanding and long-term utility for developers and system administrators:
- Clarity: We aim for a clear and readable presentation of system information. The goal is to make complex data immediately understandable, allowing you to quickly grasp the state and performance of your running tasks.
- Usefulness:
drunsis designed to provide actionable metrics that genuinely help diagnose issues and optimize workflows. We focus on delivering relevant data that informs your decisions, rather than overwhelming you with raw numbers. - Durability: The terminal interface is crafted to be robust and reliable, ensuring it functions consistently across various Unix-like environments. This focus on stability means you can depend on
drunsfor critical monitoring tasks. - Performance: We strive for minimal overhead while monitoring.
drunsis engineered to be lightweight, ensuring that the act of observing your processes does not significantly impact their performance or resource consumption.
Development
Requirements
To build and run druns from source, you will need the following:
- Rust 2024 edition
- Unix-like operating system (Linux, macOS)
Building
cargo build --release
Testing
cargo test
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Ensure tests pass (
cargo test) - Commit your changes
- Push to your fork
- Open a pull request
License
MIT License - see LICENSE.md for details.
Copyright (c) 2025 Durable Programming, LLC. All rights reserved.
Support
For bugs, feature requests, or questions, please open an issue on GitHub.
Acknowledgments
druns is built upon the robust foundation provided by several excellent open-source projects:
- ratatui - Terminal UI framework
- crossterm - Terminal manipulation
- tokio - Async runtime
- sysinfo - System monitoring
We extend our gratitude to the maintainers and contributors of these projects, and to the broader Rust community for fostering an environment of innovation and collaboration.

