Process Resource Tracker


Overview

When troubleshooting Linux services, I kept running into the same issue: I could inspect a single process, but there wasn’t a clean way to track that process plus all children and sub-children over time in one focused workflow.

That gap is what this project is built to solve.

GitHub: https://github.com/0xJasonMurray/process-resource-tracker

The Details

Existing tools are useful, but incomplete for this use case:

  • top / htop: strong live visibility, weak historical context
  • ps: static snapshots
  • broader observability tools: often too coarse or too heavy for quick process-tree analysis

What was missing was simple, service-scoped tracking that follows the full process family and summarizes behavior over time.

What This Tool Does

track_process_resources.py monitors all PIDs in a systemd service cgroup and tracks:

  • CPU usage (% of one core)
  • RSS memory
  • Disk throughput (read_bytes + write_bytes)
  • Transfer throughput (rchar + wchar)

It produces min/max/avg metrics per PID across the sampling window, with:

  • batch mode summary output
  • --live mode for top-like monitoring
  • --show-cmdline to include full command lines in live and summary output

Why This Matters

Real incidents often involve subprocesses, worker churn, and short-lived descendants that are easy to miss.
This tool makes it easier to answer:

  • Which child process is actually causing the spike?
  • Is the issue CPU, memory, disk, or transfer related?
  • What happened over the last several minutes, not just this instant?

Why I Created It

I created this because there was no good, lightweight system for tracking a process and all its descendants over time in a way that was both practical and immediately useful during troubleshooting.

This project fills that exact operational gap with a focused, dependency-free script built for Linux + systemd environments.