Logo Free My Cpu

Free My Cpu

Cộng đồng
wquguru
free-my-cpu

Safely audit and reduce CPU, load average, I/O wait, and Docker container resource pressure on macOS and Ubuntu/Linux hosts, especially remote production-like servers over SSH. Use when a host feels slow, load average is high, monitoring shows CPU spikes, Docker containers are suspected of consuming CPU, a service dashboard times out, or the user asks for a repeatable CPU optimization workflow.

Tổng quan

Nhà phát hànhwquguru
Kho mãskills
Tên kỹ năngfree-my-cpu
Sao
94
Bản fork
7
Tệp đi kèm
2
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được wquguru công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Free My Cpu trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/wquguru/skills/tree/main/skills/free-my-cpu
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wquguru/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/free-my-cpu .claude/skills/free-my-cpu
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Free My Cpu trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Free My Cpu ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Free My Cpu với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Free My CPU

Core Rule

Prefer a read-only audit before changing anything. Separate CPU saturation from I/O wait, memory pressure, blocked tasks, noisy dashboards, and runaway containers. Classify findings by safety and impact before recommending restarts, rate limits, query changes, or container resource caps. Never kill processes, restart services, edit crontab/systemd timers, change Docker Compose limits, or throttle production workloads unless the user explicitly accepts the exact target and impact.

Quick Audit

Detect the platform and pressure first:

bash
uname -a
uptime
nproc
free -h
cat /proc/pressure/cpu 2>/dev/null || true
cat /proc/pressure/io 2>/dev/null || true

For Ubuntu/Linux, run the bundled read-only script first when possible:

bash
bash scripts/audit_linux_cpu.sh

For macOS, there is no bundled cleanup script yet; start with read-only built-ins:

bash
uptime
sysctl -n hw.ncpu
vm_stat
top -l 1 -o cpu -stats pid,command,cpu,mem,state,time | head -40
ps aux -r | head -30

On Apple Silicon laptops, distinguish real CPU saturation from Spotlight, photo analysis, backup, Docker Desktop, browser tabs, and Xcode indexing before proposing changes.

For a remote Linux host, replace my-server with the SSH alias:

bash
ssh my-server 'bash -s' < scripts/audit_linux_cpu.sh
ssh my-server 'SAMPLES=5 INTERVAL=10 LOG_SCAN=1 bash -s' < scripts/audit_linux_cpu.sh

Use SAMPLES and INTERVAL to collect multiple Docker CPU snapshots. Use LOG_SCAN=1 only when recent container logs are relevant; it scans a short tail for timeout, error, retry, OOM, and slow-request clues.

If the script is not suitable, gather the same facts manually:

bash
uptime
nproc
free -h
ps -eo pid,ppid,user,stat,wchan:24,pcpu,pmem,etime,comm,args --sort=-pcpu | head -30
ps -eo pid,ppid,user,stat,wchan:24,pcpu,pmem,etime,comm,args | sed -n '1p; / D/p' | head -60
docker stats --no-stream --format 'table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}' 2>/dev/null || true
docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}' 2>/dev/null || true

When load is much higher than CPU count, always check I/O and blocked tasks:

bash
cat /proc/pressure/io 2>/dev/null || true
iostat -xz 1 2 2>/dev/null || true
ps -eo pid,ppid,user,stat,wchan:24,pcpu,pmem,etime,comm,args | sed -n '1p; / D/p' | head -60

Interpretation

Treat these as different problems:

  • CPU-bound: high %user or %system, high Docker CPU, little I/O wait, few D-state tasks.
  • I/O-bound: high load with notable %iowait, high /proc/pressure/io, D-state tasks, database or Influx queries timing out.
  • Memory pressure: low available memory, high swap use, OOM messages, containers near memory limits.
  • Monitoring-induced load: Grafana refreshes, alert rules, or wide time-range queries that repeatedly timeout and force InfluxDB, Postgres, or app APIs to scan too much data.
  • App-loop load: logs show fast retries, reconnect storms, failed parsing loops, stuck schedulers, or repeated slow admin endpoints.

Use repeated samples before naming the culprit. A Grafana panel, backup, du, or migration can create a temporary spike that should not be treated as a steady-state offender.

Docker Workflow

  1. Rank containers by CPU over several samples:
bash
for i in 1 2 3; do
  date -Is
  docker stats --no-stream --format '{{.Name}} {{.CPUPerc}} {{.MemUsage}} {{.PIDs}}' | sed 's/%//' | sort -k2 -nr | head -20
  sleep 10
done
  1. Map hot containers back to Compose projects and services:
bash
for c in container-a container-b; do
  docker inspect "$c" --format 'pid={{.State.Pid}} restart={{.RestartCount}} image={{.Config.Image}} project={{index .Config.Labels "com.docker.compose.project"}} service={{index .Config.Labels "com.docker.compose.service"}}'
done
  1. Check whether CPU limits are absent:
bash
docker inspect container-a --format 'NanoCpus={{.HostConfig.NanoCpus}} CpuQuota={{.HostConfig.CpuQuota}} CpuPeriod={{.HostConfig.CpuPeriod}} CpusetCpus={{.HostConfig.CpusetCpus}} Memory={{.HostConfig.Memory}}'
  1. Inspect recent logs for causes, not just symptoms:
bash
docker logs --since 30m --tail 200 container-a 2>&1 | grep -Ei 'timeout|deadline|error|warn|retry|oom|slow|duration|500|panic' | tail -80

Data Service Checks

For Postgres containers, prefer read-only activity and table-size checks:

bash
docker exec postgres-container psql -U app -d app -c "select pid, usename, state, now()-query_start as age, wait_event_type, wait_event, left(query, 260) as query from pg_stat_activity where state <> 'idle' order by query_start asc limit 12;"
docker exec postgres-container psql -U app -d app -c "select relname, pg_size_pretty(pg_total_relation_size(relid)) as total_size from pg_catalog.pg_statio_user_tables order by pg_total_relation_size(relid) desc limit 10;"

For InfluxDB or user-provided Grafana-backed dashboards, look for wide-range Flux queries, alert rules, high refresh rates, and repeated timeout logs. Prefer narrowing dashboard time ranges, raising aggregate windows, caching expensive panels, or reducing refresh cadence before restarting the database.

External Monitoring Evidence

Use Grafana or another monitoring UI only when the user provides the dashboard URL, panel name, screenshot, exported query, or explicit time range to inspect. Do not assume a default dashboard for a host, and do not browse monitoring systems just because the host name is familiar.

When the user provides a Grafana URL, keep it read-only:

bash
curl -fsSL 'https://grafana.example.com/api/dashboards/uid/<uid>' | python3 -m json.tool

Prefer these checks:

  • Match dashboard time range to the host-side audit timestamp.
  • Compare host CPU, load, I/O wait, memory, and container CPU panels against uptime, PSI, iostat, ps, and docker stats.
  • Extract panel queries when available, then identify expensive time ranges, high-cardinality grouping, short aggregate windows, or failing alert expressions.
  • Treat screenshots as supporting evidence, not proof; confirm with host-side samples before naming a culprit.

If the user only says "check Grafana" without a URL or screenshot, ask for the dashboard URL and relevant time window before using Grafana evidence. Continue with host-side read-only audit while waiting if the host is accessible.

Safety Tiers

Treat these as usually safe:

  • Stop or wait for accidental one-off audits such as du, find, ad hoc backups, or manual reports after confirming ownership.
  • Reduce a Grafana dashboard refresh interval or time range when it is causing repeated query timeouts.
  • Disable or fix a broken alert rule that fires every minute with failing expression queries.
  • Add or tune app-side caching for slow read-only admin/stat endpoints.
  • Fix noisy retry loops, parsing errors, or reconnect storms in application code.

Treat these as safe but with workflow impact:

  • Restart a stateless web/API container after confirming it has health checks and no in-flight critical job.
  • Lower worker concurrency, scheduler frequency, scrape frequency, or LLM enrichment parallelism.
  • Add Docker CPU limits for non-critical services after choosing a limit that leaves headroom for databases and monitoring.
  • Vacuum or reindex a database table during a low-traffic window after checking locks and disk space.

Treat these as high impact:

  • Killing processes or containers, restarting databases, restarting Docker, rebooting the host, or changing kernel/sysctl limits.
  • Stopping trading, ingestion, queue workers, captioning, enrichment, or alerting services that may drop work or miss market events.
  • Changing persistent database settings, retention policies, or deleting metrics without a rollback plan.
  • Running broad filesystem scans on a host already under I/O pressure.

Cleanup Workflow

  1. State host capacity and pressure: CPU count, load averages, memory/swap, CPU PSI, I/O PSI, and whether the issue is CPU-bound or I/O-bound.
  2. Report top containers and processes across repeated samples, not a single spike.
  3. Identify likely causes from logs, active database queries, provided monitoring evidence, API timeouts, retry loops, or blocked tasks.
  4. Propose actions by safety tier with expected impact.
  5. Only after user approval, perform the chosen action and recheck uptime, docker stats, pressure metrics, service health, and relevant dashboard/API behavior.

Host-Specific Context

Use host-specific knowledge only when the user provides it in the request, local repository instructions, a runbook, or a clearly relevant previous audit. Keep those notes separate from the generic workflow so they do not leak into unrelated hosts.

For any named remote host, start with a read-only audit:

bash
ssh my-server 'SAMPLES=3 INTERVAL=10 LOG_SCAN=1 bash -s' < scripts/audit_linux_cpu.sh

Then adapt based on observed services: databases, metrics stores, queues, trading systems, ingestion workers, CI runners, web APIs, or monitoring agents. Do not hard-code container names, dashboards, URLs, ports, or business-critical assumptions into the skill; report host-specific findings in the task answer instead.

Scheduled Monitoring

Do not create cron, systemd timers, launchd jobs, or Codex automations unless the user asks for scheduled monitoring. Default schedules to read-only audit/reporting. Do not schedule restarts, kills, Docker prunes, database maintenance, or container limit changes without explicit approval of the exact command, cadence, and risk.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Free My Cpu làm được gì?

Safely audit and reduce CPU, load average, I/O wait, and Docker container resource pressure on macOS and Ubuntu/Linux hosts, especially remote production-like servers over SSH. Use when a host feels slow, load average is high, monitoring shows CPU spikes, Docker containers are suspected of consuming CPU, a service dashboard times out, or the user asks for a repeatable CPU optimization workflow.

Vì sao nên dùng Free My Cpu trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Free My Cpu là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Free My Cpu trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/wquguru/skills/tree/main/skills/free-my-cpu. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Free My Cpu?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Free My Cpu với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Free My Cpu với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Free My Cpu có miễn phí không?

Kỹ năng này được wquguru phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇