Resource spike watch

From SteelMorgan/1c-agent-based-dev-framework · View interactive version

Resource spike watch is an AI agent skill from the GitHub repository SteelMorgan/1c-agent-based-dev-framework. Use when you need to capture a CPU or memory spike inside the agent/dev container with process owners and limited log tails.

How to use this skill

Skill file

Resource Spike Watch

Purpose

Use this skill when you need to understand which process inside the container consumed CPU or memory, especially if the IDE/Cursor/terminal froze only after the spike.

Framework tool:

/workspaces/work/repos/1C Framework/1c-agent-based-dev-framework/tools/resource-spike-watch/resource-spike-watch.py

It runs inside the container and reads:

Run

Basic run in the current container:

nohup python3 "/workspaces/work/repos/1C Framework/1c-agent-based-dev-framework/tools/resource-spike-watch/resource-spike-watch.py" \
  --output-dir /tmp/resource-spike-captures \
  >/tmp/resource-spike-watch.log 2>&1 &

Default thresholds:

For a container with a different memory limit, explicitly specify thresholds:

python3 ".../resource-spike-watch.py" --cpu-cores 4 --mem-high 6g --mem-growth 768m

Where to find the result

By default, captures are written to:

/tmp/resource-spike-captures/

The monitor log itself, if launched through nohup as above:

/tmp/resource-spike-watch.log

Each triggered alert creates a directory of the form:

/tmp/resource-spike-captures/2026-07-07T09-31-12Z-cpu-4.82-cores/

Inside:

How to read

  1. Start with summary.txt.
  2. For CPU, look at proc-cpu-delta.tsv, not ps-top.txt: it shows CPU delta over the interval, not the average since process start.
  3. For memory, look at proc-memory.tsv and cgroup.txt.
  4. If there was an OOM, check the growth of oom / oom_kill counters in cgroup.txt.
  5. For connection with 1C/VA/MCP, look at logs/manifest.txt, then the tails of /tmp/web-transport.log, /tmp/va-mcp-*.log, /tmp/mcp-client.log.

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.