feat: add process resource monitor

This commit is contained in:
Codex
2026-05-06 06:09:29 +00:00
parent cd784f5e4b
commit a0b9f8fb97
13 changed files with 543 additions and 19 deletions
+23
View File
@@ -18,12 +18,35 @@ export interface ProviderHeartbeatMessage {
at: string;
}
export interface ProcessResourceSummary {
pid: number;
ppid: number;
uid: number;
user: string;
name: string;
command: string;
state: string;
cpuPercent: number;
memoryPercent: number;
rssBytes: number;
vmsBytes: number;
threads: number;
readBytes: number;
writeBytes: number;
readBytesPerSecond: number;
writeBytesPerSecond: number;
elapsedSeconds: number;
startedAt: string;
}
export interface SystemStatusSnapshot {
ok: boolean;
collectedAt: string;
cpu: Record<string, JsonValue>;
memory: Record<string, JsonValue>;
disk: Record<string, JsonValue>;
processes?: ProcessResourceSummary[];
processSummary?: Record<string, JsonValue>;
errors: JsonValue[];
}