Files
ubicloud/bin/respirate
Enes Cakir 680ed02e12 Log the system's overall utilization every minute
Previously, we printed similar logs for each VM host, but they were hard
to digest.

Aggregated utilization by location, architecture, and allocation state
is more useful for us.

For utilization grouped by architecture, I log the utilization of
accepting VM hosts; we don't need to consider draining VM hosts.

Example logs

```json
{
  "location_utilization": {
    "allocation_state": "accepting",
    "location": "hetzner-fsn1",
    "arch": "x64",
    "host_count": 1,
    "used_cores": 1,
    "total_cores": 32,
    "core_utilization": 3.13,
    "used_hugepages_1g": 2,
    "total_hugepages_1g": 249,
    "hugepage_utilization": 0.8
  },
  "message": "location utilization",
  "time": "2024-12-10 19:47:31 +0000",
  "thread": "st10g0vmh0st0vt111zat10nzz"
}

{
  "arch_utilization": {
    "host_count": 1,
    "used_cores": 1,
    "total_cores": 32,
    "used_hugepages_1g": 2,
    "total_hugepages_1g": 249,
    "arch": "x64",
    "core_utilization": 3.13,
    "hugepage_utilization": 0.8
  },
  "message": "arch utilization",
  "time": "2024-12-10 19:47:31 +0000",
  "thread": "st10g0vmh0st0vt111zat10nzz"
}
```
2024-12-11 17:03:54 +03:00

1.7 KiB
Executable File