start: live server stats over SSE (1 s): CPU, RAM, net, disk IO with 60 s sparklines, per-container CPU/mem/state; one shared netdata poller that runs only while /start is open (owner-only /start/live)
All checks were successful
Deploy production / deploy (push) Successful in 1m29s

This commit is contained in:
2026-10-25 18:49:00 +00:00
parent ce8b545f60
commit c897ae3d14
8 changed files with 683 additions and 26 deletions

View File

@@ -67,6 +67,29 @@ export type HostSnapshot = {
timers: TimerState[];
b2: Record<string, unknown> | null;
};
/** One second of live stats from /start/live (see #lib/server/live-stats). */
export type LiveContainer = {
/** CPU % of one core (like `docker stats`), memory in bytes. */
cpu: number | null;
mem: number | null;
state: string | null;
health: string | null;
};
export type LiveFrame = {
t: number;
/** Host CPU % (all cores = 100) and iowait share. */
cpu: number;
iowait: number;
mem: { used: number; total: number };
/** Bits per second. */
net: { rx: number; tx: number };
/** Bytes per second. */
io: { read: number; write: number };
load: number[];
containers: Record<string, LiveContainer>;
};
export type LiveHistory = Pick<LiveFrame, 't' | 'cpu' | 'mem' | 'net' | 'io'>[];
export type NtfyMessage = {
id: string;
topic: string;