diff --git a/CLAUDE.md b/CLAUDE.md index df65fe6..444efe1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -107,6 +107,7 @@ ssh kisfenyo@192.168.0.162 "docker ps --filter name=felhom-controller --format ' ``` Then build with the next version (e.g., if current is 0.2.10, use 0.2.11): +IMPORTANT!: Build directory is: ~/build/felhom-controller ```bash ssh kisfenyo@192.168.0.180 "cd ~/build/felhom-controller && git -C ~/git/deploy-felhom-compose pull && ./build.sh --push" ``` @@ -139,7 +140,7 @@ ssh kisfenyo@192.168.0.162 "docker logs felhom-controller --tail 20" | Step | Command | Where | |------|---------|-------| | 1. Commit + push | `git add -A && git commit -m "..." && git push` | Local (this repo) | -| 2. Build + push image | `ssh 192.168.0.180 "... ./build.sh --push"` | Build server | +| 2. Build + push image | `ssh 192.168.0.180 "cd ~/build/felhom-controller... ./build.sh --push"` | Build server | | 3. Deploy | `ssh 192.168.0.162 "... docker compose up -d"` | Demo node | | 4. Verify | `ssh 192.168.0.162 "docker ps ..."` | Demo node | diff --git a/controller/.gitignore b/controller/.gitignore index e8ad33b..50faa6d 100644 --- a/controller/.gitignore +++ b/controller/.gitignore @@ -4,6 +4,8 @@ bin/ *.dll *.so *.dylib +controller +controller.exe # Test artifacts coverage.out diff --git a/controller/controller b/controller/controller deleted file mode 100644 index 69475ba..0000000 Binary files a/controller/controller and /dev/null differ diff --git a/controller/internal/metrics/store.go b/controller/internal/metrics/store.go index 936f165..46e605f 100644 --- a/controller/internal/metrics/store.go +++ b/controller/internal/metrics/store.go @@ -149,8 +149,8 @@ func (s *MetricsStore) QuerySystemMetrics(from, to time.Time, resolution int) ([ SELECT (ts / ?) * ? AS bucket_ts, AVG(cpu_percent), - AVG(mem_used_mb), - AVG(mem_total_mb), + ROUND(AVG(mem_used_mb)), + ROUND(AVG(mem_total_mb)), AVG(temp_celsius), AVG(load_avg_1), AVG(load_avg_5),