From de9da8caf9eddefe50adaebad3fa615d76fe5cda Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 9 Dec 2022 13:59:43 +0100 Subject: [PATCH] fix --- apps/api/src/routes/api/v1/servers/handlers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/routes/api/v1/servers/handlers.ts b/apps/api/src/routes/api/v1/servers/handlers.ts index 24437181f..9b163ab7b 100644 --- a/apps/api/src/routes/api/v1/servers/handlers.ts +++ b/apps/api/src/routes/api/v1/servers/handlers.ts @@ -71,9 +71,9 @@ export async function showUsage(request: FastifyRequest) { let { remoteEngine } = request.query remoteEngine = remoteEngine === 'true' ? true : false if (remoteEngine) { - const { stdout: stats } = await executeCommand({ sshCommand: true, shell: true, dockerId: id, command: `vmstat -s` }) + const { stdout: stats } = await executeCommand({ sshCommand: true, dockerId: id, command: `vmstat -s` }) const { stdout: disks } = await executeCommand({ sshCommand: true, shell: true, dockerId: id, command: `df -m / --output=size,used,pcent|grep -v 'Used'| xargs` }) - const { stdout: cpus } = await executeCommand({ sshCommand: true, shell: true, dockerId: id, command: `nproc --all` }) + const { stdout: cpus } = await executeCommand({ sshCommand: true, dockerId: id, command: `nproc --all` }) const { stdout: cpuUsage } = await executeCommand({ sshCommand: true, shell: true, dockerId: id, command: `echo $[100-$(vmstat 1 2|tail -1|awk '{print $15}')]` }) const parsed: any = parseFromText(stats) return {