Skip to main content

Crate lsofrs

Crate lsofrs 

Source
Expand description

lsofrs — modern, high-performance lsof implementation in Rust

Maps the relationship between processes and the files they hold open. Supports regular files, directories, sockets, pipes, devices, and streams.

The binary entry points (lsofrs, lsf, and the lsof alias crate) are all one line over run(), so every shipped name runs identical code.

Re-exports§

pub use run::gather_processes;
pub use run::run;

Modules§

cli
Command-line argument parsing
config
config submodule. Persistent configuration — reads/writes ~/.lsofrs.conf (TOML)
csv_out
csv_out submodule. CSV export for pipelines/spreadsheets
delta
delta submodule. Delta highlighting — track FD changes between iterations
filter
filter submodule. Selection and filtering logic
follow
follow submodule. Follow mode — watch a single process’s FDs in real-time
json
json submodule. JSON output module
leak
leak submodule. FD leak detection — track monotonically increasing FD counts
linux
linux submodule. Linux process enumeration via /proc filesystem
monitor
monitor submodule. Live full-screen monitoring mode (like top)
net_map
net_map submodule. Network connection map grouped by remote host
output
output submodule. Columnar and field output formatting
pipe_chain
pipe_chain submodule. Trace pipe/socket pairs between processes, show IPC topology
ports
ports submodule. Show listening ports summary (like ss -tlnp)
resolve
resolve submodule. Host and service name resolution for socket names.
run
run submodule — the CLI dispatch shared by every binary name. Binary dispatch for the lsofrs / lsf / lsof entry points.
stale
stale submodule. Find FDs pointing to deleted files
stall
stall submodule. Per-FD socket backpressure classifier — poll each socket FD’s kernel send/recv buffer occupancy over successive samples and classify the direction of the stall.
strutil
strutil submodule. String helpers for display — avoid panicking on UTF-8 boundaries.
summary
summary submodule. Aggregate FD summary/statistics mode
theme
theme submodule. Color theme system for the ratatui TUI
top
top submodule. Top-N mode — live-sorted processes by FD count, auto-refreshing dashboard
tree
tree submodule. Process tree view — show parent/child relationships with FD counts
tui_app
tui_app submodule. Shared TUI application framework using ratatui
tui_tabs
tui_tabs submodule. Unified tabbed TUI — single --tui flag launches all modes as tabs
types
types submodule.
watch
watch submodule. Watch mode — monitor who opens/closes a specific file over time