मुख्य सामग्री पर जाएँ
Skillpedia
एनालिसिस और स्प्रेडशीट48k · #4055

brendangregg-use-tsa

यह क्या करती है

यह एजेंट सिस्टम (जैसे सर्वर या ऐप्लिकेशन) धीमा होने या किसी दिक्कत की वजह पता करने में मदद करता है। यह सिस्टम के संसाधनों और कामों के समय की जाँच के खास तरीके इस्तेमाल करके समस्या की मूल वजह ढूँढता है।

कब इस्तेमाल करें

  • ✓जब कोई सर्वर या ऐप्लिकेशन धीमा हो और आपको कारण न पता हो।
  • ✓किसी बदलाव (जैसे अपडेट या ज़्यादा लोड) के बाद धीमापन आने पर।
  • ✓जब CPU, memory, disk या network के आंकड़े अजीब लगें और उनकी व्याख्या चाहिए।

Skill का लिंक

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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/brendangregg-use-tsa/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरा सर्वर बहुत धीमा है, क्या आप इसकी वजह पता कर सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

सबसे पहले यह समस्या के बारे में सवाल पूछता है। फिर हर सिस्टम संसाधन (CPU, memory, network, disk) के उपयोग, सैचुरेशन और एरर का विश्लेषण करता है। इसके बाद देखता है कि टास्क (threads) अपना समय कैसे बिताते हैं, ताकि रुकावटें (bottlenecks) मिल सकें।

तकनीकी सामग्री (मूल 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
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills