Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing

procutils is currently distributed as source. Deb and Rpm packages are planned but not yet available; a Nix flake is provided.

Building from source

You will need a recent Rust toolchain. The easiest way to install one is via rustup; the repository pins a specific toolchain via rust-toolchain.toml, which rustup will pick up automatically.

git clone https://github.com/rustutils/procutils
cd procutils
cargo build --release

The build produces one binary per tool in target/release/ (free, top, vmstat, etc.), plus a single multicall binary called procutils that behaves like any of the individual tools when invoked under the matching name (in the spirit of busybox). Symlinking procutils to top, ps, and so on is the simplest way to deploy the whole suite from a single binary.

With Nix

A flake.nix is provided at the repo root, using crane to drive the cargo build with the toolchain pinned by rust-toolchain.toml.

# Build the multicall binary plus all individual tools
nix build github:rustutils/procutils

# Run a tool ad-hoc without installing
nix run github:rustutils/procutils -- top

# Drop into a development shell with the right toolchain, just, and
# nightly rustfmt for `cargo +nightly fmt`
nix develop github:rustutils/procutils

The flake also exposes checks.<system>.{procutils,procutils-clippy,procutils-test} for CI integrations.

Static MUSL build

For deployment to systems without a matching glibc, the tools can be built against MUSL libc to produce fully static binaries. Install the MUSL target once:

rustup target add x86_64-unknown-linux-musl

Then build with:

cargo build --release --target x86_64-unknown-linux-musl

The resulting binaries land in target/x86_64-unknown-linux-musl/release/ and can be copied to any Linux host with no runtime dependencies.

Building a single tool

Each tool is its own crate inside the workspace. To build just one:

cargo build --release -p procutils-top

The crates are named procutils-<tool>; see the tools section for the full list.