devwatch is a lightweight Linux device observability tool written in Rust.
Think: lsof + htop, but for Linux devices
Linux provides excellent tools for observing systems:
- Processes →
top,htop - Files →
lsof
But there is no simple way to answer:
- Which process is using my GPU?
- Who opened
/dev/video0? - Which application is interacting with hardware devices?
devwatch fills this gap.
It bridges:
-
/proc→ processes -
/dev→ device nodes -
/sys→ kernel metadata (drivers, subsystems) -
By default,
devwatchshows devices currently opened by processes. -
Use
--all-devicesto inspect all discoverable/devdevice nodes. -
So you can clearly understand how software interacts with hardware and kernel subsystems in real time.
- Process → device mapping via
/proc /dev→/sysresolution using device numbers- Subsystem detection (e.g.,
drm,input,sound) - Driver detection with parent traversal
- Device classification:
physicalvirtualpseudo
- Cross-platform support:
- x86 Linux
- Raspberry Pi
- Embedded Linux platforms (MPSoC, i.MX, etc.)
== drm (3) ==
DEVICE PROCESSES KIND DRIVER DEVNUM SYSFS
------------------------------------------------------------------------------------------------------------------------
/dev/dri/card1 chrome(3597) [468.2 MB] physical i915 226:1 /sys/class/drm/card1
code(6088) [241.7 MB]
/dev/dri/renderD128 chrome(3597) [468.2 MB] physical i915 226:128 /sys/class/drm/renderD128
code(6088) [241.7 MB]src/
├── lib.rs # Library entry
├── model.rs # Shared data structures
├── procfs_layer.rs # Process + FD discovery
├── dev_layer.rs # /dev extraction & grouping
├── sysfs_layer.rs # /dev -> /sys resolution
└── bin/
└── devwatch.rs # CLI entry pointcargo build --release
cargo run --bin devwatchcargo build --release --target aarch64-unknown-linux-gnu --bin devwatchgit clone https://github.com/ravikiranbvn/devwatch
cd devwatch
cargo build --release
./target/release/devwatchDownload from GitHub Releases:
https://github.com/ravikiranbvn/devwatch/releases
tar -xzf devwatch-linux-x86_64.tar.gz
cd devwatch-linux-x86_64
./devwatch# Default view (grouped by subsystem)
devwatch
# Filter by subsystem
devwatch --subsystem drm
# Filter by driver
devwatch --driver i915
# Filter by device name
devwatch --device video
# Show all devices (not just active ones)
devwatch --all-devices
# JSON output
devwatch --json
# Count only
devwatch --count-only🎯 Use Cases
- Debugging device access conflicts (e.g., camera, GPU)
- Understanding hardware usage by applications
- Inspecting device behavior on embedded Linux systems
- Exploring Linux internals (/proc, /dev, /sys) in a unified view
🤝 Contributing
Feedback, issues, and pull requests are welcome.
Open an issue for bugs or feature requests Submit a PR for improvements


