File size: 3,455 Bytes
bad179a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # Server Monitor (Windows)
A Qt 5 / C++17 desktop program for Windows that watches Windows machines in detail, keeps their history from seconds to years, analyzes that history with plain statistics (no AI), and fixes common problems automatically. It uses only Qt plus what Windows ships: PowerShell and the OpenSSH client. All charts and gauges are drawn by hand with `QPainter`.
It is the Windows edition of the Linux program in `Server Monitor(cqt-linux)`: the same code with a different `src/core/Platform.cpp`.
## Build and run
Install Qt 5.15 (MinGW or MSVC kit), open the matching Qt command prompt in this folder and run:
```bat
build.bat
build\release\ServerMonitor.exe
```
`build.bat` runs `qmake`, the compiler, and `windeployqt` (which copies the Qt DLLs next to the program). Qt Creator (`ServerMonitor.pro`) and CMake (`CMakeLists.txt`) work too.
## Servers
Add or remove servers from the sidebar or the dashboard. There are two ways to connect:
- **This machine:** no setup.
- **SSH:** the app uses the Windows `ssh` client. The server needs the *OpenSSH Server* feature; nothing else is installed on it. Keys are recommended (add your public key to the server's `authorized_keys`). A password also works if the local `ssh` is OpenSSH 8.4 or newer (check with `ssh -V`); older versions cannot take the password from a program.
A PowerShell script (in `src/core/Platform.cpp`) reads CIM classes and .NET counters on the monitored machine and prints one frame per interval. All calculations happen in the app.
Control actions run as the user the app (or the SSH login) runs as. Restarting services, ending other users' processes and cleanup need an administrator: start the app with **Run as administrator**, or log in over SSH with an administrator account.
## Features
Same as the Linux edition: dashboard, per-server tabs (Overview, CPU, Memory, Storage, Network, Processes, Services, History, Insights & Autopilot, Alert rules, Console), history at four resolutions (6 h of samples, 30 days of minutes, 2 years of hours, 20 years of days), statistical analysis every minute, autopilot with dry run, alert rules, events and `alerts.log`.
What differs on Windows:
- **Load average** is computed the Unix way (running + waiting threads, smoothed over 1 / 5 / 15 minutes) from CPU usage and the processor queue length.
- **CPU time** is split into user, kernel and interrupts + DPC. There is no I/O wait or steal counter.
- **Swap** is the page file. Swap thrashing is reported when the page file is over half used, memory is over 90 % and the disks are over 50 % busy.
- **Failed service** means: start type Automatic, stopped, with an error exit code.
- **Processes:** End task, Kill, Kill tree, and priority classes (Idle … High). Process owners are shown only when the app runs as administrator.
- **Temperatures** appear only if the machine exposes ACPI thermal zones (many do not). GPUs need `nvidia-smi`.
- The default sample interval is 3 s.
## Status
The shared code is tested on Linux. The Windows-specific part was tested there against simulated Windows data, so the parser and the whole UI are exercised, but **the PowerShell collector and the Windows commands have not been run on a real Windows machine yet**.
Settings are in `%LOCALAPPDATA%\ServerMonitor\ServerMonitor\servers.json`, history in the `history` folder next to it. Saved SSH passwords are only lightly disguised, not encrypted, so prefer keys.
|