A local, real-time system monitor for Windows, built with .NET 10 / WPF. It shows CPU / RAM / per-disk / network / NPU / GPU0 / GPU1 utilization and temperatures on a single dark dashboard, plus network health (VPN detection, external IP + geolocation, host ping), persists every sample to SQLite, and includes basic report analytics.
繁體中文詳細說明請見下方 繁體中文 段落。
Grab PCMonitor.exe from the latest Release — a single self-contained EXE (~198 MB, all native DLLs embedded; no .NET runtime or installer needed). Put it anywhere, double-click, accept the UAC prompt. To update, just replace the EXE. If the raw EXE download is slow, take the .zip and extract it. The EXE is unsigned, so SmartScreen may warn on first run (More info → Run anyway).
- Real-time dashboard (2 s refresh by default): CPU %, CPU temp (package + per-core), RAM, per-disk capacity + activity, per-NIC throughput, NPU, GPU0/GPU1 load + temp, NVMe/SSD temps — each metric with a live sparkline.
- Traffic-light status colors (green / amber / red / grey) on a dark, near-black theme; the accent color is reserved for sparklines.
- Network health: VPN connection detection, external IP + geolocation (ip-api.com), configurable host ping (latency + rolling uptime %).
- Connectivity history: unreachability is recorded as outage events (open after N consecutive ping failures, close on recovery with duration); a History window filters by host + range and shows a 24 h outage badge on the Connectivity card.
- Process explorer: double-click the CPU / Memory / GPU0 / GPU1 card to list the top-10 processes by that resource (realtime + average over 1/10/30/60 min), with a kill action behind a confirm dialog. Per-process GPU usage comes from the "GPU Engine" / "GPU Process Memory" counters mapped to each GPU by DXGI adapter LUID.
- Battery card: charge level, AC / charging state and battery health (full-charge vs design capacity) on laptops.
- Threshold alerts: optional tray notifications when CPU or GPU temperature crosses a configurable threshold (60 s per-metric cooldown).
- Persistence: every sample written to SQLite (WAL, single writer, batched flush), 7-day retention by default with periodic purge + incremental vacuum.
- Reports: pick a metric + range → server-side bucketed avg/max/min chart + data grid + CSV export.
- Disk analysis & cleanup: one-click scan of browser caches, package-manager caches (npm/pip/uv/NuGet), Windows temp/WER/update leftovers, vendor app caches (NVIDIA/CapCut/WeChat) and AppData heavyweights, classified GREEN / YELLOW / RED with evidence, side effects and suggested commands. WinSxS is analyzed read-only via DISM, VSS distinguishes actual vs maximum usage, and Docker/WSL/source workspaces are hard-excluded (totals only). Cleanup follows analysis → per-item approval → pre-delete guard checks (path blacklist, ±20 % size drift, running processes, locked-file skips) → audit log → automatic rescan; only whitelisted official commands run, and deletions remove contents but keep the root folder. Design details in
Docs/Disk_Cleanup_Feature_Design.md. - Quality-of-life settings: optional Windows auto-start (logon scheduled task with highest privileges — the app requires elevation, which the Run key cannot provide), external-IP lookup on/off, configurable process-sampler interval.
- Bilingual Traditional Chinese / English with runtime switching; minimizes to the system tray.
- Standalone: no dependency on any external monitoring tool at runtime.
- Windows 10 / 11. The published build is self-contained and single-file (all managed and native dependencies embedded in the EXE) — no .NET runtime installation needed; copy just
PCMonitor.exe. - Administrator rights are required to read CPU / GPU / motherboard temperatures via LibreHardwareMonitor's ring0 driver (a UAC prompt appears on launch). Without elevation, those temps show
N/Awhile every other metric keeps working (graceful degradation).
Temperatures depend on what the underlying library can read on a given machine:
- CPU package / per-core temp: on some platforms — e.g. Intel Arrow Lake (Core Ultra 200 HX-series) — LibreHardwareMonitor 0.9.6 (and 0.9.7-pre) exposes the temperature sensor objects but never obtains a value, so they read
N/A. This was confirmed by reflection: the values are genuinely absent internally, not merely hidden. - Motherboard / chipset temp: often
N/Awhen the board's Super I/O / Embedded Controller is locked by the BIOS (common on laptops). - Intel integrated-GPU temp: frequently unavailable (load still reads correctly).
- GPU (NVIDIA/AMD) temps, NVMe/SSD temps, and all utilization / network / ping / IP metrics work normally.
dotnet build -c Debug
dotnet run -c Debug # UAC prompt (admin)
dotnet test tests/PCMonitor.Tests # unit tests (OutageTracker, formatters)
dotnet publish PCMonitor.csproj -c Release -r win-x64 /p:PublishSingleFile=true -o publish # self-contained single EXE, native DLLs embedded (IncludeNativeLibrariesForSelfExtract)run-elevated.cmd self-elevates and runs --dump → --lhm → launches the dashboard, useful for a one-shot verification of temps and the sensor map.
PCMonitor.exe --dump # one-shot snapshot to console + last-dump.txt (no UI)
PCMonitor.exe --shot out.png # sample 6 s then screenshot the dashboard and exit
PCMonitor.exe --lhm # list all LHM hardware/sensors (incl. EC probe) -> lhm-sensors.txt
PCMonitor.exe --dbcount # print DB sample count + first/last timestamp
PCMonitor.exe --seedoutage # write 2 demo outage rows (verify the History window)
PCMonitor.exe --dbcountoutages # print outage row count
PCMonitor.exe --lang en # force language (auto/zh/en)Data (settings + SQLite DB + logs) lives in %LocalAppData%\PCMonitor\.
Unreachability is recorded as outage events: a host going down (after a configurable number of consecutive ping failures, default 3) opens a row with DownAt; recovering closes it with RecoveredAt + duration. Open the History window from the toolbar or the Connectivity card (its button also shows a 24 h outage count). Retention is configurable (default 30 days).
MIT — see LICENSE. Copyright (c) 2026 Henry Jia.
This project uses the following third-party components:
- LibreHardwareMonitorLib — Mozilla Public License 2.0 (MPL-2.0). Used as an unmodified NuGet assembly; per the MPL-2.0 this imposes no copyleft obligation on PCMonitor's own source, but the library's source is available at the link above and its license terms apply to the library itself. © LibreHardwareMonitor contributors.
- LiveCharts2 (LiveChartsCore.SkiaSharpView.WPF) — MIT.
- SkiaSharp — MIT (rendering backend pulled in by LiveCharts2).
- SQLite (SQLitePCLRaw.bundle_e_sqlite3) — Public Domain.
- Entity Framework Core (Microsoft.EntityFrameworkCore.Sqlite) — MIT.
- CommunityToolkit.Mvvm — MIT.
- Microsoft.Extensions.DependencyInjection — MIT.
Issues and pull requests are welcome. Please keep the project standalone (no runtime dependency on external monitoring tools), and note that any change to hardware-sensor reading touches ring0 / driver code paths — test carefully and avoid guessing undocumented MSR/register layouts.
本機即時系統監控工具(.NET 10 / WPF)。集中顯示 CPU / RAM / 各磁碟 / 網路 / NPU / GPU0 / GPU1 的占用率與溫度,附網路健康資訊(VPN、外部 IP + 地理位置、網站 ping),所有樣本落 SQLite,內建基本報表分析。獨立運行,運行時不依賴任何外部監控工具。
從最新 Release 下載 PCMonitor.exe — 單一自包含 EXE(約 198 MB,原生 DLL 全部內嵌;免裝 .NET runtime、免安裝器)。放到任意資料夾雙擊執行、同意 UAC 即可;更新時直接覆蓋 EXE。若直接下載 EXE 太慢,改抓 .zip 解壓。EXE 未簽署,首次執行 SmartScreen 可能跳警告(更多資訊 → 仍要執行)。
- 即時儀表板(預設 2 秒刷新):CPU%、CPU 溫度(封裝 + 逐核)、RAM、各磁碟容量與活動度、各網路卡吞吐、GPU0/GPU1 負載與溫度、NPU、NVMe/SSD 溫度,每個指標含即時 sparkline。
- 交通燈狀態色(綠 / 琥珀 / 紅 / 灰)於深色近黑主題;強調色僅保留給 sparkline。
- 網路狀態:VPN 連線偵測、外部 IP + 地理位置(ip-api.com)、預設主機 ping 延遲與可達率。
- 連線歷史:主機不可達會記成中斷事件(連續 N 次 ping 失敗才開單、恢復時記時長);History 視窗可按主機 + 區間篩選,連線卡上顯示 24 小時中斷次數。
- 程序探索器:雙擊 CPU / Memory / GPU0 / GPU1 卡片 → 列出該資源占用最高的 10 個程序(realtime + 1/10/30/60 分鐘平均),kill 前有確認對話框。每程序 GPU 占用來自「GPU Engine / GPU Process Memory」計數器,以 DXGI adapter LUID 歸戶到各 GPU。
- 電池卡:筆電上顯示電量、AC / 充電狀態與電池健康度(滿充容量 vs 設計容量)。
- 閾值告警:CPU / GPU 溫度超過可設閾值時彈系統匣通知(每項 60 秒冷卻)。
- 持久化:所有樣本寫入 SQLite(WAL、單寫者、批次),預設保留 7 天,定期 purge + incremental vacuum。
- 報表:選 metric + 範圍 → server-side 分桶 avg/max/min 圖表 + 資料表 + CSV 匯出。
- 磁碟分析與清理:一鍵掃描瀏覽器快取、套件管理器快取(npm/pip/uv/NuGet)、Windows 系統暫存/WER/更新殘留、廠商 App 快取(NVIDIA/剪映/微信)與 AppData 大戶,按 GREEN / YELLOW / RED 分級列出證據、副作用與建議命令;WinSxS 走 DISM 唯讀分析、VSS 區分實際用量與上限;Docker/WSL/原始碼工作區為硬排除區只顯示總量。清理走「分析→逐項批准→刪除前十項二次驗證(路徑黑名單/容量漂移 ±20%/程序退出/鎖定檔跳過)→審計日誌→自動復測」流程,官方命令只跑白名單、刪除只刪內容保留根目錄。設計細節見
Docs/Disk_Cleanup_Feature_Design.md。 - 貼心設定:可選開機自啟(以「最高權限」登入排程任務實現——本程式需系統管理員權限,Run 機碼對需提權程式會被靜默跳過)、外部 IP 查詢開關、程序取樣間隔可調。
- 雙語(繁中 / English,可即時切換)、收合系統匣常駐。
CPU 溫度、主機板溫度、部分感測器需透過 LibreHardwareMonitor 的 ring0 核心驅動(WinRing0 類)讀取硬體暫存器,只有系統管理員權限能載入該驅動。因此程式以 requireAdministrator 啟動,每次執行會跳 UAC 提示。
- 未獲管理員權限時,溫度類讀數會顯示 N/A,但 CPU%/RAM/磁碟/網路/GPU 負載(經 NVAPI)/ping/IP 仍可正常運作(graceful degradation)。
- anti-cheat 警告:WinRing0 類驅動在部分反作弊軟體(Vanguard、FACEIT 等)的封鎖清單上。若執行本程式時啟動某些遊戲,遊戲可能拒絕啟動。結束本程式(系統匣 → 退出)即卸載驅動。
- 部分主機板的 EC/SMBus 探測可能讓驅動載入較慢;本程式以背景緒 + 15 秒 watchdog 處理,逾時僅溫度顯示 N/A,不影響其餘監控與 UI。
溫度取決於底層函式庫在該機器能讀到什麼:
- CPU 封裝 / 逐核溫度:部分平台(如 Intel Arrow Lake / Core Ultra 200 HX 系列)在 LibreHardwareMonitor 0.9.6(與 0.9.7-pre)下,溫度感測器物件存在但從未取得值,故顯示 N/A。經反射探查確認:值在內部確實不存在,非僅未暴露。
- 主機板 / 晶片組溫度:當 Super I/O / EC 被 BIOS 鎖定時常為 N/A(筆電常見)。
- Intel 內顯溫度:常不可得(負載仍可讀)。
- GPU(NVIDIA/AMD)溫度、NVMe/SSD 溫度,以及所有占用率 / 網路 / ping / IP 指標皆正常。
dotnet build -c Debug
dotnet run -c Debug # 會跳 UAC(管理員)
dotnet test tests/PCMonitor.Tests # 單元測試(OutageTracker、格式化)
dotnet publish PCMonitor.csproj -c Release -r win-x64 /p:PublishSingleFile=true -o publish # 自包含單檔 exe(原生 DLL 內嵌,單拷 EXE 即可執行)附 run-elevated.cmd:雙擊自動以管理員重啟自身,依序跑 --dump → --lhm → 啟動儀表板,方便一次驗證溫度與感測器地圖。
PCMonitor.exe --dump # 取樣一次輸出快照到控制台 + last-dump.txt(不進 UI)
PCMonitor.exe --shot out.png # 取樣 6 秒後截圖儀表板再退出
PCMonitor.exe --lhm # 列出 LHM 全部硬體/感測器(含 EC 探測)→ lhm-sensors.txt
PCMonitor.exe --dbcount # 讀取 DB 樣本筆數與首末時間戳
PCMonitor.exe --seedoutage # 寫 2 筆示範 outage(驗證歷史視窗)
PCMonitor.exe --dbcountoutages # 讀取 outage 筆數
PCMonitor.exe --lang en # 強制語言(auto/zh/en)不可達以 outage 事件 記錄:主機由通變不通(連續 ping 失敗達門檻,預設 3 次)開一條記 DownAt;恢復則補 RecoveredAt + 時長。從工具列或「連線監測」卡開歷史視窗(卡上按鈕亦顯示近 24h outage 數)。保留天數可調(預設 30 天)。
診斷:用
--lhm可列出 LHM 看到的全部硬體/感測器(含 Embedded Controller 探測),判斷某溫度到底是「感測器不存在」還是「存在但讀不到值」。 備註:經反射探查確認,LHM 0.9.6 在此機內部也沒有任何隱藏的 CPU/內顯溫度值(CPU 溫度 sensor 物件存在但從未成功採樣;內顯連溫度 sensor 都未建立),故反射路不可行;補回需 LHM 上游支援 Arrow Lake。
全部在 %LocalAppData%\PCMonitor\(C:\Users\<你>\AppData\Local\PCMonitor\):
settings.json— 設定pcmonitor.db(+-wal/-shm)— SQLite 時間序列error.log/run.log— 例外與生命周期日誌(各 200MB 上限,超過滾動為.1)cleanup\plan-*.json— 磁碟清理掃描計畫(保留最近 10 份)cleanup\audit.jsonl— 磁碟清理審計日誌
MIT — 見 LICENSE。Copyright (c) 2026 Henry Jia。
- LibreHardwareMonitorLib — Mozilla Public License 2.0 (MPL-2.0)。以未修改的 NuGet 組件形式使用;依 MPL-2.0 對 PCMonitor 自身源碼無 copyleft 義務,但該函式庫源碼見上鏈、其授權條款適用於該函式庫本身。© LibreHardwareMonitor contributors。
- LiveCharts2 — MIT。
- SkiaSharp — MIT(LiveCharts2 帶入的渲染後端)。
- SQLite(SQLitePCLRaw.bundle_e_sqlite3)— Public Domain。
- Entity Framework Core — MIT。
- CommunityToolkit.Mvvm — MIT。
- Microsoft.Extensions.DependencyInjection — MIT。
歡迎 issue 與 PR。請保持專案獨立運行(運行時不依賴外部監控工具);任何更動硬體感測器讀取的改動都會碰到 ring0 / 驅動路徑,務必謹慎測試、切勿猜測未公開的 MSR/暫存器佈局。