Merge pull request #104 from BRAVO68WEB/patch/sys-info-api

⚙ modified sys info api
This commit is contained in:
Jyotirmoy Bandyopadhayaya 2023-06-24 13:38:28 +05:30 committed by GitHub
commit 126bb15dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 13 deletions

View File

@ -1,3 +1,5 @@
import os from 'node:os';
export default class InfoService {
static async getSystemInfo() {
const sys = {
@ -7,19 +9,8 @@ export default class InfoService {
uptime: process.uptime(),
memoryUsage: process.memoryUsage(),
cpuUsage: process.cpuUsage(),
pid: process.pid,
ppid: process.ppid,
cwd: process.cwd(),
execPath: process.execPath,
execArgv: process.execArgv,
argv: process.argv,
env: process.env,
config: process.config,
title: process.title,
version: process.version,
versions: process.versions,
release: process.release,
features: process.features,
kernelVersion: os.release(),
hostname: os.hostname(),
};
return sys;