processLoad now returns array

This commit is contained in:
Sebastian Hildebrandt
2021-01-19 15:13:31 +01:00
parent a289ad4e3e
commit 95b93af551
7 changed files with 276 additions and 155 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ function test(f) {
else if (f === 'M') { si.memLayout().then(data => { if (data !== null) { resolve({ data, title: 'Memory Layout' }); } else { resolve('not_supported') } }) }
else if (f === 'o') { si.osInfo().then(data => { if (data !== null) { resolve({ data, title: 'OS Info' }); } else { resolve('not_supported') } }) }
else if (f === 'p') { si.processes().then(data => { if (data !== null) { resolve({ data, title: 'Processes' }); } else { resolve('not_supported') } }) }
else if (f === 'P') { si.processLoad('postgres').then(data => { if (data !== null) { resolve({ data, title: 'Process Load' }); } else { resolve('not_supported') } }) }
else if (f === 'P') { si.processLoad('postgres, login, apache, mysql, nginx, git').then(data => { if (data !== null) { resolve({ data, title: 'Process Load' }); } else { resolve('not_supported') } }) }
else if (f === 'r') { si.printer().then(data => { if (data !== null) { resolve({ data, title: 'Printer' }); } else { resolve('not_supported') } }) }
else if (f === 's') { si.services('apache2, postgres').then(data => { if (data !== null) { resolve({ data, title: 'Services' }); } else { resolve('not_supported') } }) }
else if (f === 'S') { si.shell().then(data => { if (data !== null) { resolve({ data, title: 'Shell' }); } else { resolve('not_supported') } }) }
+12 -12
View File
@@ -16,18 +16,18 @@ function printHeader() {
function printMenu() {
console.log('');
console.log('┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐');
console.log('│ a ... Audio h ... Bluetooth s ... Services 1 ... NET Iface Default ? ... Get Object │');
console.log('│ b ... BIOS i ... INET Latency S ... Shell 2 ... NET Gateway Default , ... All Static │');
console.log('│ B ... Baseboard I ... INET Check Site t ... time 3 ... NET Interfaces . ... All Dynamic │');
console.log('│ C ... Chassis j ... CPU Current Speed T ... CPU Temperature 4 ... NET Stats / ... All │');
console.log('│ c ... CPU l ... CPU Current Load u ... USB 5 ... NET Connections │');
console.log('│ d ... DiskLayout L ... Full Load U ... UUID │');
console.log('│ D ... DiskIO m ... Memory v ... Versions 6 ... Docker Info │');
console.log('│ e ... Block Devices M ... MEM Layout V ... Virtual Box 7 ... Docker Container │');
console.log('│ E ... Open Files o ... OS Info w ... WIFI networks 8 ... Docker Cont Stats │');
console.log('│ f ... FS Size p ... Processes y ... System 9 ... Docker Cont Proc │');
console.log('│ F ... FS Stats P ... Process Load Y ... Battery 0 ... Docker All │');
console.log('│ g ... Graphics r ... Printer z ... Users q >>> QUIT │');
console.log('│ a ... Audio h ... Bluetooth s ... Services ? ... Get Object │');
console.log('│ b ... BIOS i ... INET Latency S ... Shell , ... All Static │');
console.log('│ B ... Baseboard I ... INET Check Site t ... time 1 ... NET Iface Default . ... All Dynamic │');
console.log('│ C ... Chassis j ... CPU Current Speed T ... CPU Temperature 2 ... NET Gateway Default / ... All │');
console.log('│ c ... CPU l ... CPU Current Load u ... USB 3 ... NET Interfaces │');
console.log('│ d ... DiskLayout L ... Full Load U ... UUID 4 ... NET Stats │');
console.log('│ D ... DiskIO m ... Memory v ... Versions 5 ... NET Connections │');
console.log('│ e ... Block Devices M ... MEM Layout V ... Virtual Box 6 ... Docker Info │');
console.log('│ E ... Open Files o ... OS Info w ... WIFI networks 7 ... Docker Container │');
console.log('│ f ... FS Size p ... Processes y ... System 8 ... Docker Cont Stats │');
console.log('│ F ... FS Stats P ... Process Load Y ... Battery 9 ... Docker Cont Proc │');
console.log('│ g ... Graphics r ... Printer z ... Users 0 ... Docker All q >>> QUIT │');
console.log('└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘');
}