dsh-vitals 0.1.8 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/index.js +2 -2
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-vitals"><img src="https://img.shields.io/npm/dm/dsh-vitals?color=34d399" alt="npm downloads"></a>
|
|
8
8
|
<img src="https://img.shields.io/badge/dependencies-0-34d399" alt="zero runtime dependencies">
|
|
9
9
|
<a href="LICENSE"><img src="https://img.shields.io/github/license/JoblessJoe/dsh-vitals?color=34d399" alt="MIT license"></a>
|
|
10
|
+
<a href="https://joblessjoe.com/dsh-vitals"><img src="https://img.shields.io/badge/website-joblessjoe.com-34d399" alt="project page on joblessjoe.com"></a>
|
|
10
11
|
<a href="https://github.com/awesome-dsh-plugin/awesome-dsh-plugin"><img src="https://img.shields.io/badge/awesome-dsh--plugin-fc60a8" alt="listed on awesome-dsh-plugin"></a>
|
|
11
12
|
</p>
|
|
12
13
|
|
|
@@ -62,7 +63,7 @@ offers and hides itself when there is none:
|
|
|
62
63
|
| ------ | ----- | ----- | ------- |
|
|
63
64
|
| CPU load (overall + per core) | `/proc/stat` | `os.cpus()` | `os.cpus()` |
|
|
64
65
|
| Memory | `/proc/meminfo` | `vm_stat` (counts cache as available, like Activity Monitor) | `os.freemem()` |
|
|
65
|
-
| CPU temperature | `/sys/class/thermal` | hidden (needs root) | WMI thermal zones, when the board exposes them |
|
|
66
|
+
| CPU temperature | `/sys/class/thermal` | hidden (needs root) | WMI thermal zones, when the board exposes them (often needs dsh running as admin) |
|
|
66
67
|
| NVIDIA GPUs | `nvidia-smi` | `nvidia-smi` | `nvidia-smi.exe` (PATH or `NVSMI` folder) |
|
|
67
68
|
| Apple / other GPUs | — | `ioreg` utilisation + memory in use | — |
|
|
68
69
|
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function parseVmStat(out) {
|
|
|
15
15
|
const page = Number(out.match(/page size of (\d+) bytes/)?.[1]);
|
|
16
16
|
if (!Number.isFinite(page) || page <= 0) return null;
|
|
17
17
|
const pages = (key) => Number(out.match(new RegExp(`^${key}:\\s+(\\d+)`, "m"))?.[1] ?? 0);
|
|
18
|
-
const avail = pages("Pages free") + pages("Pages inactive") + pages("Pages speculative")
|
|
18
|
+
const avail = pages("Pages free") + pages("Pages inactive") + pages("Pages speculative");
|
|
19
19
|
return avail > 0 ? avail * page : null;
|
|
20
20
|
}
|
|
21
21
|
function parseIoreg(out) {
|
|
@@ -115,7 +115,7 @@ function sampleCpu() {
|
|
|
115
115
|
return { total, cores, model: cpuModelOnce() };
|
|
116
116
|
} catch {
|
|
117
117
|
const now = cpus().map((c) => {
|
|
118
|
-
const t = [c.user, c.nice, c.sys, c.idle, c.irq];
|
|
118
|
+
const t = [c.times.user, c.times.nice, c.times.sys, c.times.idle, c.times.irq];
|
|
119
119
|
return { t, idle: t[3] };
|
|
120
120
|
});
|
|
121
121
|
const prev = prevCpuTimes;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vitals",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Live hardware load panel for the DeepSeek Harness web GUI: a btop-style tab showing CPU load per core and overall, DRAM usage, CPU temperatures, and per-GPU temperature/load/power/VRAM. Reads /proc and nvidia-smi on the host and polls ~1s in the browser.",
|
|
5
|
+
"homepage": "https://joblessjoe.com/dsh-vitals",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "lib/index.js",
|
|
7
8
|
"exports": {
|
|
@@ -79,7 +80,8 @@
|
|
|
79
80
|
},
|
|
80
81
|
"os": [
|
|
81
82
|
"darwin",
|
|
82
|
-
"linux"
|
|
83
|
+
"linux",
|
|
84
|
+
"win32"
|
|
83
85
|
],
|
|
84
86
|
"scripts": {
|
|
85
87
|
"build": "node scripts/build.mjs",
|