dsh-ops-kit 0.3.4 → 0.3.6
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/index.js +5 -5
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -1697,7 +1697,7 @@ async function tailProcessLog(cfg, source, lines = 200) {
|
|
|
1697
1697
|
if (raw.startsWith('jar:')) {
|
|
1698
1698
|
const jar = raw.slice(4).trim()
|
|
1699
1699
|
if (!/^[A-Za-z0-9._@/-]+$/.test(jar)) throw new Error('bad jar name')
|
|
1700
|
-
const found = await ssh(cfg, `pgrep -f -- ${JSON.stringify(jar)} 2>/dev/null
|
|
1700
|
+
const found = await ssh(cfg, `for p in $(pgrep -f -- ${JSON.stringify(jar)} 2>/dev/null); do c=$(tr '\\0' ' ' < /proc/$p/cmdline 2>/dev/null); case "$c" in *java*) echo "$p"; break;; esac; done`, 20_000)
|
|
1701
1701
|
pid = Number(String(found.stdout || '').trim())
|
|
1702
1702
|
if (!pid) {
|
|
1703
1703
|
return {
|
|
@@ -1722,10 +1722,10 @@ async function tailProcessLog(cfg, source, lines = 200) {
|
|
|
1722
1722
|
|
|
1723
1723
|
if (probed && probed !== '-' && !probed.startsWith('session-') && !probed.includes(' ')) {
|
|
1724
1724
|
const res = await ssh(cfg, `journalctl -u ${probed} -n ${n} --no-pager 2>&1`, 25_000)
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1725
|
+
const body = String(res.stdout || '')
|
|
1726
|
+
const meaningful = body.split('\n').filter(line => line.trim() && !line.startsWith('--')).length > 0
|
|
1727
|
+
if (res.ok && meaningful) {
|
|
1728
|
+
return { host: cfg.name, source: raw, resolved: probed, via: 'journal', ok: true, lines: body.slice(0, 60_000), error: '' }
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
1731
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ops-kit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Server operations kit for DeepSeek Harness: server cards, health charts, config browser, app manager and plain-language AI diagnosis — over SSH, no agent install.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"ai-diagnosis"
|
|
40
40
|
],
|
|
41
41
|
"engines": {
|
|
42
|
+
"dsh": ">=0.2.1-rc.4",
|
|
42
43
|
"node": "^22.19.0 || >=24.0.0"
|
|
43
44
|
},
|
|
44
45
|
"dsh": {
|