process-monitor

Monitor system processes for resource usage using process-tree watch mode. Use when tracking CPU or memory usage over time, finding resource hogs, or watching a specific process. Triggers include "monitor processes", "watch cpu usage", "process monitor", "top processes", "resource usage", "ptree watch".

7 stars

Best use case

process-monitor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Monitor system processes for resource usage using process-tree watch mode. Use when tracking CPU or memory usage over time, finding resource hogs, or watching a specific process. Triggers include "monitor processes", "watch cpu usage", "process monitor", "top processes", "resource usage", "ptree watch".

Teams using process-monitor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/process-monitor/SKILL.md --create-dirs "https://raw.githubusercontent.com/heldernoid/agentic-build-templates/main/projects/cli-tools/process-tree/skills/process-monitor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/process-monitor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How process-monitor Compares

Feature / Agentprocess-monitorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Monitor system processes for resource usage using process-tree watch mode. Use when tracking CPU or memory usage over time, finding resource hogs, or watching a specific process. Triggers include "monitor processes", "watch cpu usage", "process monitor", "top processes", "resource usage", "ptree watch".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# process-monitor

Guide to monitoring processes with process-tree's watch mode and resource filters.

## Watching Resource Usage

```bash
# Continuously refresh full tree
ptree watch

# Watch only high-CPU processes
ptree watch --min-cpu 10

# Watch a specific application subtree
ptree watch --name node

# Watch with faster refresh
ptree watch --interval 1
```

Press `q` or `Ctrl-C` to stop watching.

## Finding Resource Hogs

```bash
# Sort by CPU usage to see top consumers first
ptree --sort cpu

# Find processes using a lot of memory
ptree --sort mem

# Show only processes above CPU threshold
ptree --min-cpu 5

# Show only processes above memory threshold
ptree --min-mem 500
```

## Reading the Output

Resource columns:
- CPU%: percentage of one CPU core (can exceed 100% on multi-core)
- MEM: resident set size in MB

In watch mode, CPU values are current snapshots. High CPU over multiple refreshes indicates sustained load.

The tree structure shows which parent started which process. A high-CPU child process is often spawned by a parent that started a task.

## Common Monitoring Tasks

```bash
# What is using port 3000?
ptree --port 3000

# Which node processes are running?
ptree --name node

# How much CPU is postgres using?
ptree --name postgres

# Watch a server process and its workers
ptree watch --root 8421      # watch from specific PID down

# Find all processes for a user
ptree --user deploy
```

## Killing Resource Hogs

```bash
# Kill a runaway process
ptree kill 8421

# Kill and all its children
ptree kill 8421 --subtree

# Force kill if SIGTERM not working
ptree kill 8421 --signal SIGKILL --yes
```

## Compact Mode for Busy Systems

On systems with many processes, use `--compact` to collapse groups of identical-named worker processes into a single line with a count:

```bash
ptree --compact
ptree watch --compact
```

This shows `node x12` instead of 12 individual node rows.

Related Skills

Skill: Uptime Monitoring

7
from heldernoid/agentic-build-templates

## Overview

serial-monitor

7
from heldernoid/agentic-build-templates

No description provided.

ssl-cert-monitor

7
from heldernoid/agentic-build-templates

Operate ssl-cert-monitor -- add hosts, configure alert rules, trigger checks, review history, and deploy the stack.

backup-monitor

7
from heldernoid/agentic-build-templates

Track backup jobs via heartbeat pings, alert on missed or failed backups. Use when you need to monitor scheduled backup scripts, get alerted when a backup misses its window, or track backup execution history. Triggers include "backup monitoring", "backup alerts", "missed backup", "backup heartbeat", "backup job tracking", or any task involving backup reliability verification.

cron-monitor

7
from heldernoid/agentic-build-templates

Send heartbeat pings to cron-monitor after cron job completion, check job status, and register new jobs. Use when you need to confirm a scheduled task ran successfully, check if a cron job is healthy, or add monitoring to a new cron script. Triggers include "ping cron-monitor", "check job status", "register cron job", "heartbeat", "cron health check", or any task involving scheduled job monitoring.

database-size-monitor

7
from heldernoid/agentic-build-templates

Dashboard for monitoring PostgreSQL and MySQL table sizes over time, with growth tracking, threshold alerts, and snapshot comparison

data-pipeline-monitor

7
from heldernoid/agentic-build-templates

Track ETL and data pipeline jobs with success/failure status, duration tracking, heartbeat monitoring, and dependency visualization. Use when you need to monitor scheduled jobs, detect failures, track pipeline health over time, or visualize ETL step dependencies. Triggers include "pipeline monitoring", "job tracking", "ETL status", "cron job health", "heartbeat monitor", "pipeline failed", or any task involving monitoring data workflows.

process-tree

7
from heldernoid/agentic-build-templates

View the system process hierarchy as a tree with resource usage. Use when exploring parent-child process relationships, finding what process owns a port, monitoring CPU/memory, or sending signals. Triggers include "process tree", "ptree", "what is running", "process on port", "pstree", "who owns port", "kill process".

file-processing

7
from heldernoid/agentic-build-templates

Handle file upload, validation, processing pipelines, and temporary file management in Node.js servers. Use when building file processing APIs with Express and multer, managing temporary files with cleanup, or implementing secure file handling patterns. Triggers include "file upload", "multipart form", "temp file cleanup", "multer config", or any server-side file handling task.

Skill: Status Page

7
from heldernoid/agentic-build-templates

## Overview

Skill: unit-conversion

7
from heldernoid/agentic-build-templates

## Overview

Skill: recipe-scaler

7
from heldernoid/agentic-build-templates

## Overview