All checks were successful
continuous-integration/drone/push Build is passing
31 lines
594 B
TypeScript
31 lines
594 B
TypeScript
import { APIClient } from "./ApiClient";
|
|
|
|
export interface LoadAverage {
|
|
one: number;
|
|
five: number;
|
|
fifteen: number;
|
|
}
|
|
|
|
export interface SysInfoStatusSystem {
|
|
physical_core_count: number;
|
|
uptime: number;
|
|
used_memory: number;
|
|
available_memory: number;
|
|
free_memory: number;
|
|
load_average: LoadAverage;
|
|
}
|
|
|
|
export interface SysInfoStatus {
|
|
system: SysInfoStatusSystem;
|
|
}
|
|
|
|
export class SysInfoApi {
|
|
/**
|
|
* Get system status
|
|
*/
|
|
static async Status(): Promise<SysInfoStatus> {
|
|
return (await APIClient.exec({ method: "GET", uri: "/sysinfo/status" }))
|
|
.data;
|
|
}
|
|
}
|