Skip to content

Commit

Permalink
feat: change memory data
Browse files Browse the repository at this point in the history
  • Loading branch information
hackycy committed Oct 13, 2021
1 parent 91a4676 commit 0cc9abb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/modules/admin/system/serve/serve.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/modules/admin/system/serve/serve.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -51,8 +50,7 @@ export class SysServeService {
disk: diskinfo,
memory: {
total: meminfo.total,
used: meminfo.used,
free: meminfo.free,
available: meminfo.available,
},
};
}
Expand Down

0 comments on commit 0cc9abb

Please sign in to comment.