Files
tyto/backend/cmd/server/main.go
vikingowl 38a598baaa Initial commit: System monitor web application
Full-stack system monitoring dashboard for Linux with AMD GPU support.

Features:
- Real-time metrics via Server-Sent Events (SSE)
- CPU usage per core with frequency and load averages
- Memory and swap utilization
- Disk usage and I/O activity
- Network interfaces with traffic stats
- Process list sorted by CPU or memory
- Temperature sensors (CPU, GPU, NVMe, motherboard)
- AMD GPU monitoring (utilization, VRAM, temp, clocks, power, fan)
- Configurable refresh rate (1-60 seconds)

Stack:
- Backend: Go + Gin, reading from /proc and /sys
- Frontend: SvelteKit 5 + Tailwind CSS
- Deployment: Docker Compose with host volume mounts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 04:26:11 +01:00

26 lines
550 B
Go

package main
import (
"log"
"system-monitor/internal/api"
"system-monitor/internal/config"
"system-monitor/internal/sse"
)
func main() {
cfg := config.Load()
log.Printf("Starting system monitor backend on port %s", cfg.Port)
log.Printf("Reading from: proc=%s, sys=%s", cfg.ProcPath, cfg.SysPath)
log.Printf("Default refresh interval: %s", cfg.RefreshInterval)
broker := sse.NewBroker(cfg)
go broker.Run()
server := api.NewServer(cfg, broker)
if err := server.Run(); err != nil {
log.Fatalf("Failed to start server: %v", err)
}
}