forked from samchon/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor.ts
More file actions
25 lines (21 loc) · 886 Bytes
/
Copy pathmonitor.ts
File metadata and controls
25 lines (21 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import api from "../api";
import { Configuration } from "../Configuration";
import { SGlobal } from "../SGlobal";
import { IPerformance } from "../api/structures/monitors/IPerformance";
import { ISystem } from "../api/structures/monitors/ISystem";
async function main(): Promise<void>
{
// CONFIGURE MODE
if (process.argv[2])
SGlobal.setMode(process.argv[2].toUpperCase() as typeof SGlobal.mode);
// GET PERFORMANCE & SYSTEM INFO
const connection: api.IConnection = {
host: `http://${Configuration.MASTER_IP}:${Configuration.API_PORT}`,
encryption: Configuration.ENCRYPTION_PASSWORD
};
const performance: IPerformance = await api.functional.monitors.performance.get(connection);
const system: ISystem = await api.functional.monitors.system.get(connection);
// TRACE THEM
console.log({ performance, system });
}
main();