From 0cc9abb2974042c47adff06a49a57c5096aa389c Mon Sep 17 00:00:00 2001 From: hackycy Date: Wed, 13 Oct 2021 11:38:44 +0800 Subject: [PATCH] feat: change memory data --- src/modules/admin/system/serve/serve.class.ts | 10 ++-------- src/modules/admin/system/serve/serve.service.ts | 4 +--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/modules/admin/system/serve/serve.class.ts b/src/modules/admin/system/serve/serve.class.ts index 2a008e4..d6fcf78 100644 --- a/src/modules/admin/system/serve/serve.class.ts +++ b/src/modules/admin/system/serve/serve.class.ts @@ -39,9 +39,6 @@ export class Cpu { @ApiProperty({ description: '速度 in GHz e.g. 3.4' }) speed?: number; - @ApiProperty({ description: '最大速度 in GHz 例如 3.9' }) - speedMax?: number; - @ApiProperty({ description: 'CPU资源消耗 原始滴答' }) rawCurrentLoad?: number; @@ -67,11 +64,8 @@ export class Memory { @ApiProperty({ description: 'total memory in bytes' }) total?: number; - @ApiProperty({ description: 'not used in bytes' }) - free?: number; - - @ApiProperty({ description: 'used (incl. buffers/cache)' }) - used?: number; + @ApiProperty({ description: '可用内存' }) + available?: number; } /** diff --git a/src/modules/admin/system/serve/serve.service.ts b/src/modules/admin/system/serve/serve.service.ts index 36c0fb9..439a6a7 100644 --- a/src/modules/admin/system/serve/serve.service.ts +++ b/src/modules/admin/system/serve/serve.service.ts @@ -38,7 +38,6 @@ export class SysServeService { physicalCores: cpuinfo.physicalCores, model: cpuinfo.model, speed: cpuinfo.speed, - speedMax: cpuinfo.speedMax, rawCurrentLoad: currentLoadinfo.rawCurrentLoad, rawCurrentLoadIdle: currentLoadinfo.rawCurrentLoadIdle, coresLoad: currentLoadinfo.cpus.map((e) => { @@ -51,8 +50,7 @@ export class SysServeService { disk: diskinfo, memory: { total: meminfo.total, - used: meminfo.used, - free: meminfo.free, + available: meminfo.available, }, }; }