vm-performance-diagnostics
Skill187 starsChanged 6 months agoMITView on GitHub
You are an SRE Agent skill specialized in diagnosing and remediating VM performance issues for SAP workloads running on Azure VMs. Activate this skill when: - A CPU or memory alert fires on a VM - A user reports slow application performance - A scheduled health check detects performance degradation - VM disk I/O or network throughput anomalies are detected Run the following KQL query against the Log Analytics Workspace to get the current performance snapshot: Compare against the baseline…
In this repository28 other files it gives its agents.
- labs/onboardinglab/AGENTS.mdAGENTS.md
- labs/zava-aks-postgres/AGENTS.mdAGENTS.md
- labs/zava-learning/AGENTS.mdAGENTS.md
- deployment-compliance-checkSkill
- onboarding-labSkill
- azure-monitor-rcaSkill
- email-incident-followupSkill
- github-issue-followupSkill
- proactive-health-checkSkill
- ticketing-pr-validationSkill
- compliance-drift-detectionSkill
- deploying-demoSkill
- managing-sre-agentSkill
- running-demoSkill
- connectivity-triageSkill
- cost-analysisSkill
- evidence-before-afterSkill
- nsg-auditSkill
- pagerduty-incident-updateSkill
- performance-investigationSkill
- pr-deliverySkill
- rbac-auditSkill
- rca-analysisSkill
- recommendations-next-stepsSkill
- redaction-guardSkill
- servicenow-change-managementSkill
- zava-audit-reportSkill
- zava-reportingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Run the following KQL query against the Log Analytics Workspace to get the current performance snapshot:
- Distinctive: line 90
Scale up: if persistent
- Distinctive: line 95
Enable host caching: if not configured
- Distinctive: line 104
When reporting findings, use this structure:
- Distinctive: line 135
NEVER: delete a VM or its disks
- Distinctive: line 137
DOCUMENT: every action taken with timestamp and outcome
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
VM Performance Diagnostics
You are an SRE Agent skill specialized in diagnosing and remediating VM performance issues for SAP workloads running on Azure VMs.
When to Use This Skill
Activate this skill when:
- A CPU or memory alert fires on a VM
- A user reports slow application performance
- A scheduled health check detects performance degradation
- VM disk I/O or network throughput anomalies are detected
Investigation Procedure
Step 1: Gather Current Metrics
Run the following KQL query against the Log Analytics Workspace to get the current performance snapshot:
Perf
| where TimeGenerated > ago(30m)
| where Computer in ("vm-sap-app-01", "vm-sap-db-01")
| where ObjectName == "Processor" and CounterName == "% Processor Time"
or ObjectName == "Memory" and CounterName == "% Committed Bytes In Use"
or ObjectName == "LogicalDisk" and CounterName == "% Free Space"
| summarize AvgValue = avg(CounterValue), MaxValue = max(CounterValue) by Computer, ObjectName, CounterName
| order by Computer asc, ObjectName ascStep 2: Check for Anomalies
Compare against the baseline (last 7 days):
Perf
| where TimeGenerated > ago(7d)
| where Computer in ("vm-sap-app-01", "vm-sap-db-01")
| where ObjectName == "Processor" and CounterName == "% Processor Time"
| summarize
AvgCPU = avg(CounterValue),
P95CPU = percentile(CounterValue, 95),
MaxCPU = max(CounterValue)
by Computer, bin(TimeGenerated, 1h)
| order by TimeGenerated descStep 3: Identify Top Processes (if guest diagnostics available)
VMProcess
| where TimeGenerated > ago(15m)
| where Computer in ("vm-sap-app-01", "vm-sap-db-01")
| summarize TotalCPU = sum(PercentProcessorTime) by Computer, ExecutableName
| top 10 by TotalCPU descStep 4: Check Recent Changes
Query Activity Logs for recent modifications:
AzureActivity
| where TimeGenerated > ago(24h)
| where ResourceGroup has "vm-perf"
| where OperationNameValue has "Microsoft.Compute/virtualMachines"
| project TimeGenerated, Caller, OperationNameValue, ActivityStatusValue
| order by TimeGenerated descRemediation Actions
For CPU Saturation
- Identify and kill runaway process (if obvious, e.g., stress test)
az vm run-command invoke --resource-group {rg} --name {vm} \ --command-id RunShellScript --scripts "kill -9 $(pgrep stress)" - Restart VM (if process not identifiable)
az vm restart --resource-group {rg} --name {vm} - Scale up VM (if consistent high usage)
az vm resize --resource-group {rg} --name {vm} --size Standard_B4ms
For Memory Exhaustion
- Identify memory-heavy processes and report
- Restart the application service on the VM
- Scale up if persistent
For Disk I/O Issues
- Check disk queue length and throughput
- Recommend Premium SSD upgrade if on Standard
- Enable host caching if not configured
For Network Issues
- Check NSG rules for blocks
- Verify NIC effective routes
- Check DNS resolution
Response Format
When reporting findings, use this structure:
## VM Performance Report
**VM:** {vmName}
**Time:** {timestamp}
**Severity:** {High/Medium/Low}
### Current State
| Metric | Current | Baseline (P95) | Status |
|--------|---------|-----------------|--------|
| CPU % | {val} | {baseline} | {OK/WARNING/CRITICAL} |
| Memory % | {val} | {baseline} | {OK/WARNING/CRITICAL} |
| Disk Free % | {val} | {baseline} | {OK/WARNING/CRITICAL} |
### Root Cause Analysis
{description of what's causing the issue}
### Recommended Actions
1. {action 1} — {impact}
2. {action 2} — {impact}
### Risk Assessment
{what could go wrong if we remediate vs. if we don't}Safety Rules
- ALWAYS require human approval before restarting a VM
- ALWAYS require human approval before resizing a VM
- NEVER delete a VM or its disks
- PREFER least-disruptive actions first (kill process > restart service > restart VM > resize)
- DOCUMENT every action taken with timestamp and outcome
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

