diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/bin/arch.js b/bin/arch.js old mode 100644 new mode 100755 diff --git a/bin/cpu.js b/bin/cpu.js old mode 100644 new mode 100755 diff --git a/bin/hostname.js b/bin/hostname.js old mode 100644 new mode 100755 diff --git a/bin/kernel.js b/bin/kernel.js old mode 100644 new mode 100755 diff --git a/bin/memory.js b/bin/memory.js old mode 100644 new mode 100755 index 9d705b7..1dc0373 --- a/bin/memory.js +++ b/bin/memory.js @@ -2,12 +2,6 @@ const os = require("os"); module.exports = () => { const totalMemory = os.totalmem(); - const freeMemory = os.freemem(); - const usage = - String( - Math.round(totalMemory / (1024 * 1024) - freeMemory / (1024 * 1024)) + - " MiB / " + - Math.round(totalMemory / (1024 * 1024)) - ) + " MiB"; + const usage = Math.round(totalMemory / (Math.pow(1024,2))/1000)+ " GB"; return `${usage}`; }; diff --git a/bin/type.js b/bin/type.js old mode 100644 new mode 100755 diff --git a/bin/uptime.js b/bin/uptime.js old mode 100644 new mode 100755 index a972878..98d0e09 --- a/bin/uptime.js +++ b/bin/uptime.js @@ -1,7 +1,9 @@ const os = require("os"); module.exports = () => { - //TODO do better math - const uptime = String(Math.floor(os.uptime() / 60)); - return `${uptime} mins`; + const full = String(Math.floor(os.uptime() / 60)); + const hrs=String(Math.floor(full/60)) + const mins=String(Math.floor(full % 60)) + + return `${hrs} hours ${mins} mins`; }; diff --git a/docs/tool-help.png b/docs/tool-help.png old mode 100644 new mode 100755 diff --git a/docs/tool.png b/docs/tool.png old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json old mode 100644 new mode 100755 index 5dd791d..ba70d07 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "system-z", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.1.0", + "version": "1.0.0", "license": "ISC", "dependencies": { "boxen": "^5.0.1", diff --git a/package.json b/package.json old mode 100644 new mode 100755