denet, a lightweight command-line tool for process monitoring in benchmarking and beyond
Carrillo, Mallona
Summary: denet is a lightweight process monitoring utility providing real-time resource profiling of running processes. denet reports CPU, memory, disk I/O, network activity, and thread usage, including recursive child monitoring, with adaptive sampling rates. It offers both a command-line interface (CLI) with colorized outputs and a Python API for inclusion in other software. Its output formats are structured as either JSON, JSONL, or CSV, and include performance metrics as well as process metadata, including PID and the executed command. The easy to parse profiling results make denet suitable for benchmarking, debugging, monitoring, and optimizing data-intensive pipelines in bioinformatics and other fields.
Availability and implementation: denet is open-source software released under the GPLv3 license and maintained at https://github.com/btraven00/denet. It is implemented in Rust, with Python bindings provided via maturin, and can be installed from Cargo (cargo install denet) or PyPI (pip install denet). Most functionality does not require administrative privileges, enabling use on cloud platforms, HPC clusters, and standard Linux workstations. Certain advanced features, such as eBPF support, may require elevated permissions. Documentation, including usage examples and API references, is provided.
academic
denet, a lightweight command-line tool for process monitoring in benchmarking and beyond
denet is a lightweight process monitoring tool that provides real-time resource analysis of running processes. The tool reports CPU, memory, disk I/O, network activity, and thread usage, including recursive subprocess monitoring and adaptive sampling rates. It offers a command-line interface (CLI) with colored output and a Python API for integration into other software. Output formats support structured formats such as JSON, JSONL, and CSV, containing performance metrics and process metadata. The easily parsable analysis results make denet particularly suitable for benchmarking, debugging, monitoring, and optimizing data-intensive pipelines in bioinformatics and other fields.
During bioinformatics tool development and performance optimization, fine-grained resource analysis data (CPU and memory usage, disk and network I/O) is needed to guide optimization at multiple levels: code improvement, execution parameter tuning, and overall workflow design.
System-level analyzers (such as top, htop) lack process specificity, making it difficult to isolate the resource footprint of individual jobs
Process summary tools (such as time) only report cumulative totals upon completion, missing real-time dynamics that typically indicate bottlenecks
Unstructured output: The text output of existing tools is designed for interactive use and is unsuitable for automated parsing
Workflow system integration difficulties: Resource analysis provided by major workflow systems (make, snakemake, nextflow) is either missing, coarse-grained, or not customizable
Develop a new monitoring toolkit that can be used both interactively on the command line and embedded in scripts and workflow managers to meet the needs of modern bioinformatics workflows and benchmarking.
The core task of denet is to provide real-time, structured process resource monitoring, with input being the process or command to be monitored and output being a structured report containing detailed performance metrics and metadata.
Initial phase (0-1 second): Samples at the highest frequency (e.g., every 100ms) to ensure fine-grained resolution capturing process startup and transient activity peaks
Transition phase (1-10 seconds): Sampling rate gradually decreases to the maximum interval provided by the user
Stable phase (>10 seconds): Maintains the maximum interval sampling rate, minimizing system overhead for long-running tasks
Adaptive sampling: Provides high-resolution monitoring for short-term tasks while minimizing overhead for long-term tasks
Structured output: Supports JSON, JSONL, and CSV formats for easy automated processing
Cross-platform compatibility: Primarily designed for Linux, with potential macOS support through native APIs
Permission-friendly: Most features do not require administrator privileges, suitable for cloud platforms, HPC clusters, and standard Linux workstations
denet successfully fills the gap in existing process monitoring tools, particularly addressing application needs in the bioinformatics field. Its adaptive sampling, eBPF support, and dual interface design provide significant advantages among similar tools.
The paper cites important works in related fields, including:
Literature on eBPF performance tools
Research on Linux kernel eBPF runtime
Applications of eBPF in large-scale industrial systems
Related open-source projects (BCC, bpftrace, psutil, etc.)
Overall Assessment: This is a highly practical tool paper. denet successfully addresses the actual needs of process monitoring in the bioinformatics field. While relatively limited in theoretical innovation, its adaptive sampling mechanism and comprehensive feature integration have significant practical value. The tool's open-source nature and comprehensive documentation position it for widespread adoption in relevant fields.