Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
zk
gpu-dcu-monitor
Commits
5a627eaa
Commit
5a627eaa
authored
Jun 04, 2026
by
zk
Browse files
Add HYHAL env fallback for hy-smi
parent
7e88c254
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
server.js
server.js
+2
-1
No files found.
CHANGELOG.md
View file @
5a627eaa
# 更新记录
## 2026-06-04
-
增加
`hy-smi`
采集兜底:当默认环境和登录 Shell 都找不到命令时,会尝试先加载
`/opt/hyhal/env.sh`
,兼容需要手动 source HYHAL 环境的机器。
## 2026-05-29
-
新增多站点入口切换,页面侧边栏可以在昆山 / 天津中心、太原中心等独立部署之间跳转。
...
...
server.js
View file @
5a627eaa
...
...
@@ -669,7 +669,8 @@ function buildAssetCommand() {
function
buildHySmiCommand
(
args
)
{
const
command
=
[
"
hy-smi
"
,
args
].
filter
(
Boolean
).
join
(
"
"
);
return
`(
${
command
}
2>/dev/null || bash -ilc
${
shellQuote
(
command
)}
)`
;
const
hyhalCommand
=
`. /opt/hyhal/env.sh >/dev/null 2>&1 &&
${
command
}
`
;
return
`(
${
command
}
2>/dev/null || bash -ilc
${
shellQuote
(
command
)}
|| bash -lc
${
shellQuote
(
hyhalCommand
)}
)`
;
}
function
shellQuote
(
value
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment