Migrated from GitHub: hermes-2026-07-12-system-monitor
  • C++ 89.4%
  • CMake 8.4%
  • Dockerfile 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hermes bec6413fc5 feat: system-monitor - C++23 terminal TUI system monitor with FTXUI
Real-time terminal system monitoring tool in C++23:
- CPU usage per-core with color-coded progress bars
- Memory (RAM + swap) with full breakdown
- Load average, uptime, process list (top 20 by RSS)
- FTXUI terminal UI with 1-second auto-refresh
- /proc filesystem parsing with clean RAII design
- Full test coverage: 11 tests + benchmarks with Catch2 v3
2026-07-12 03:15:20 +00:00
docs feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
include/sysmon feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
src feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
tests feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
.gitignore feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
CMakeLists.txt feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
CMakePresets.json feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
Dockerfile feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
README.md feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00
vcpkg.json feat: system-monitor - C++23 terminal TUI system monitor with FTXUI 2026-07-12 03:15:20 +00:00

System Monitor — Terminal TUI para Linux

Monitor de sistema en tiempo real para terminal, desarrollado en C++23 con FTXUI.

C++23 FTXUI License

📋 Características

  • CPU: Uso por núcleo en tiempo real con barras de colores
  • Memoria: RAM usada, libre, disponible, buffers, caché, swap
  • Sistema: Uptime, load average, modelo de CPU, número de núcleos
  • Procesos: Lista ordenada por consumo de memoria (PID, nombre, estado, RSS)
  • Actualización: Refresh automático cada 1 segundo
  • Interfaz: TUI limpia con particiones, colores y bordes vía FTXUI

🚀 Compilación

Requisitos

  • GCC 14+ o Clang 18+
  • CMake 3.28+
  • Ninja

Compilar y ejecutar

# Configurar (debug)
cmake --preset debug

# Compilar
cmake --build --preset debug

# Ejecutar
./build/debug/sysmon

Tests

ctest --preset debug

Docker

docker build -t sysmon .
docker run --rm -it --pid=host sysmon

🏗️ Estructura

2026-07-12-system-monitor/
├── CMakeLists.txt          # Build principal (C++23, CMake 3.28+)
├── CMakePresets.json       # v9, debug (asan+ubsan), release (LTO)
├── Dockerfile              # multi-stage gcc:14 → debian slim
├── vcpkg.json              # manifest mode
├── .gitignore
├── README.md
├── src/
│   ├── main.cpp            # Entry point + TUI con FTXUI
│   └── sysmon.cpp          # Implementación del lector de /proc
├── include/
│   └── sysmon/
│       └── sysmon.hpp      # API pública
├── tests/
│   ├── CMakeLists.txt
│   └── test_sysmon.cpp     # Tests + benchmarks con Catch2
└── docs/
    └── architecture.md

🔧 APIs expuestas

Función Descripción
read_cpu_info() Uso de CPU total y por núcleo con snapshots
read_mem_info() Memoria: total, free, available, buffers, cached, swap
read_uptime() Tiempo de actividad del sistema
read_load_avg() Load average 1/5/15 min, procesos activos
read_process_list(n) Top-N procesos por consumo de memoria

📊 Dependencias (FetchContent)

  • FTXUI — Terminal UI library (v5.0.0)
  • spdlog — Logging header-only
  • Catch2 — Test framework (v3.8.0)

📸 Screenshot

System Monitor