← スキル一覧に戻る

server-health
by djcyphers
> A portable GitHub Copilot CLI environment optimized for Windows Server administration and network operations.
⭐ 0🍴 0📅 2026年1月6日
SKILL.md
name: server-health description: "Check Windows Server health: CPU, memory, disk, services, event logs, uptime. Use when user asks about server performance or wants a health check." license: MIT compatibility:
- copilot-cli
- vscode-copilot
- claude allowed-tools:
- windows-command-line
- console-automation
Server Health Check Skill
When to Activate
- User mentions: health check, performance, slow server, disk space, memory, CPU
- User asks "is the server OK?" or "check the server"
- User reports application slowness
Quick Health Summary (One-Liner)
# Fast health snapshot
$cpu = (Get-CimInstance Win32_Processor).LoadPercentage
$mem = Get-CimInstance Win32_OperatingSystem
$memPct = [math]::Round((($mem.TotalVisibleMemorySize - $mem.FreePhysicalMemory) / $mem.TotalVisibleMemorySize) * 100)
$disk = Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | Select-Object DeviceID, @{N='FreeGB';E={[math]::Round($_.FreeSpace/1GB)}}, @{N='UsedPct';E={[math]::Round((($_.Size - $_.FreeSpace) / $_.Size) * 100)}}
$uptime = (Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
Write-Host "CPU: $cpu% | Memory: $memPct% | Uptime: $($uptime.Days)d $($uptime.Hours)h"
$disk | Format-Table -AutoSize
Detailed Health Checks
CPU Analysis
# Current CPU with top processes
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, CPU, WorkingSet64
# CPU over time (5 samples, 2 sec apart)
Get-Counter '\Processor(_Total)\% Processor Time' -SampleInterval 2 -MaxSamples 5
Memory Analysis
# Memory breakdown
$os = Get-CimInstance Win32_OperatingSystem
[PSCustomObject]@{
'Total GB' = [math]::Round($os.TotalVisibleMemorySize / 1MB, 2)
'Free GB' = [math]::Round($os.FreePhysicalMemory / 1MB, 2)
'Used %' = [math]::Round((($os.TotalVisibleMemorySize - $os.FreePhysicalMemory) / $os.TotalVisibleMemorySize) * 100)
}
# Top memory consumers
Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 10 Name, @{N='MemMB';E={[math]::Round($_.WorkingSet64/1MB)}}
Disk Analysis
# All fixed disks
Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | ForEach-Object {
[PSCustomObject]@{
Drive = $_.DeviceID
'Size GB' = [math]::Round($_.Size / 1GB)
'Free GB' = [math]::Round($_.FreeSpace / 1GB)
'Used %' = [math]::Round((($_.Size - $_.FreeSpace) / $_.Size) * 100)
Status = if (($_.FreeSpace / $_.Size) -lt 0.1) { '⚠️ LOW' } else { '✅ OK' }
}
}
Critical Services
# Check essential services
$criticalServices = @('wuauserv', 'W32Time', 'EventLog', 'Netlogon', 'DNS', 'DFSR')
$criticalServices | ForEach-Object {
$svc = Get-Service -Name $_ -ErrorAction SilentlyContinue
if ($svc) {
[PSCustomObject]@{
Name = $svc.DisplayName
Status = $svc.Status
StartType = $svc.StartType
}
}
}
Recent Errors (Event Log)
# Last 24h errors
Get-WinEvent -FilterHashtable @{
LogName = 'System', 'Application'
Level = 1, 2 # Critical, Error
StartTime = (Get-Date).AddHours(-24)
} -MaxEvents 20 -ErrorAction SilentlyContinue |
Select-Object TimeCreated, LogName, LevelDisplayName, Message
Thresholds & Alerts
| Metric | Warning | Critical |
|---|---|---|
| CPU | > 80% sustained | > 95% sustained |
| Memory | > 85% used | > 95% used |
| Disk | < 15% free | < 5% free |
| Uptime | > 90 days (patch!) | > 180 days |
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です