본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트48k · #4055

brendangregg-use-tsa

하는 일

이 에이전트는 시스템(서버나 애플리케이션)이 느리거나 문제가 있는 이유를 알아내도록 돕습니다. 특정 방법으로 시스템 자원과 작업 타이밍을 조사해 문제의 근본 원인을 찾아냅니다.

사용하는 경우

  • ✓서버나 애플리케이션이 느린데 이유를 모를 때.
  • ✓업데이트나 부하 증가 후에 느려진 경우.
  • ✓CPU, 메모리, 디스크, 네트워크 지표가 이상해 설명이 필요할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/brendangregg-use-tsa/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/brendangregg-use-tsa/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“서버가 매우 느려요. 원인을 조사해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

먼저 문제에 대해 질문합니다. 그다음 각 시스템 자원(CPU, 메모리, 네트워크, 디스크)의 사용률, 포화도, 오류를 분석합니다. 이어서 작업(스레드)이 시간을 어떻게 쓰는지 조사해 병목을 찾습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Brendan Gregg USE+TSA Performance Analysis

Overview

A fixed, evidence-first procedure for system performance debugging, root-cause analysis (RCA), and incident reporting, distilled from Brendan Gregg's published methodologies. Instead of running whichever commands happen to be familiar, the agent poses questions first and then finds metrics to answer them: the USE Method (Utilization, Saturation, Errors) sweeps every resource, the TSA Method (Thread State Analysis) decomposes thread time, and off-CPU analysis plus flame graphs drill into what the sweeps find. Every investigation ends in a structured triage note, RCA report, or postmortem where each claim traces to a command and its output.

This skill adapts material from the community repository thecsdoctor/brendangregg-use-tsa-skill (full checklists, reference library, and report templates live there).

When to Use This Skill

  • Use when a server, VM, or container is "slow" and the cause is unknown
  • Use when latency or throughput regressed after a deploy, config change, or load shift
  • Use when CPU, memory, disk, or network metrics look abnormal and need interpretation
  • Use when an application hangs or threads pile up
  • Use when the user asks for debugging, triage, or root-cause analysis of a performance issue
  • Use when an incident needs an RCA report or a blameless postmortem with an evidence trail

How It Works

Step 0: Problem Statement

Define the problem before measuring. Ask: What makes you think there is a problem? Has it ever performed well? What changed recently (software, hardware, load)? Can it be expressed as latency or run time — quantify it. Who else is affected? What is the environment (OS, versions, config, container/VM limits)?

Step 1: 60-Second Triage (Linux)

Run the ten-command sweep, checking errors and saturation first (easiest to interpret), then utilization. Record every exonerated resource.

uptime                 # load trend (includes uninterruptible I/O on Linux)
dmesg | tail           # kernel errors: oom-killer, SYN flooding, hardware
vmstat 1               # r > CPU count = CPU saturation; si/so = swapping; wa = disk
mpstat -P ALL 1        # per-CPU imbalance (single hot CPU = single-threaded app)
pidstat 1              # per-process CPU over time
iostat -xz 1           # await (app-suffered latency), avgqu-sz, %util
free -m                # memory; buffers/cache near zero hurts
sar -n DEV 1           # NIC throughput vs link limit
sar -n TCP,ETCP 1      # active/passive connections, retransmits
top                    # spot variable load

Step 2: USE Sweep (resource-oriented)

For every resource, check Utilization, Saturation, and Errors. Iterate CPUs, memory capacity, network interfaces, storage I/O and capacity, controllers, interconnects — plus software resources (mutex locks, thread pools, process/file-descriptor capacity) and imposed limits (cgroup quotas, hypervisor caps, ulimits). Check errors before utilization. Interpretations: 100% utilization is usually a bottleneck (confirm via saturation); any non-zero saturation can be a problem; non-zero, still-increasing error counters are worth investigating; and a clean sweep is a result — it narrows the search space.

Step 3: TSA Sweep (thread-oriented)

For each thread of interest, split time into: Executing / Runnable / Anonymous Paging / Sleeping / Lock / Idle. Investigate states from most to least frequent with state-appropriate tools. If more than ~10% of time is Runnable or Anonymous Paging, fix those first — latency states can be tuned to zero. Linux instruments: /proc/PID/schedstat run_delay and perf sched latency (Runnable), vmstat si/so and per-process min_flt (Paging), offcputime/cpudist from bcc (Sleeping), /proc/lock_stat and valgrind --tool=drd (Lock), pidstat/flame graphs (Executing).

Step 4: Drill Down

Follow the biggest contributor: Executing → CPU profile + flame graph; Sleeping/Lock → off-CPU stacks (offcputime -p PID, render with flamegraph.pl --color=io); latency complaints → time-division decomposition; microservices → RED method (Rate, Errors, Duration). Prefer eBPF in-kernel aggregation over per-event dumps; start with sub-second traces in production.

Step 5: Confirm Root Cause

…

자주 묻는 질문

USE와 TSA 방법이란 무엇인가요?

USE(Utilization, Saturation, Errors)는 모든 시스템 자원의 사용량, 포화도, 오류를 확인하는 방법입니다. TSA(Thread State Analysis)는 작업 시간이 어떻게 쓰이는지(실행 중, 대기 중 등) 분석하는 방법입니다.

「근본 원인」이란 무엇인가요?

문제가 일어나는 근본적인 이유입니다. 근본 원인을 찾아야 문제를 영구적으로 해결할 수 있습니다.

「사후 보고서(postmortem)」란 무엇인가요?

사고가 발생한 후 무슨 일이 일어났는지, 원인이 무엇인지, 어떻게 해결했는지, 그리고 다시 일어나지 않도록 무엇을 해야 하는지 설명하는 문서입니다.

상세 정보

작성자의 원본 설명

Methodical performance troubleshooting and root-cause analysis with Brendan Gregg's USE and TSA methods, plus evidence-backed RCA and postmortem reports.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4055
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬