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
ffe43c1b
Commit
ffe43c1b
authored
May 28, 2026
by
zk
Browse files
Fallback hy-smi to login shell
parent
244acb79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
server.js
server.js
+11
-2
No files found.
server.js
View file @
ffe43c1b
...
@@ -320,7 +320,7 @@ function buildRemoteCommand(command) {
...
@@ -320,7 +320,7 @@ function buildRemoteCommand(command) {
"
--format=csv,noheader,nounits
"
"
--format=csv,noheader,nounits
"
].
join
(
"
"
);
].
join
(
"
"
);
}
}
return
"
hy-smi
"
;
return
buildHySmiCommand
(
""
)
;
}
}
function
buildModelCommand
(
command
)
{
function
buildModelCommand
(
command
)
{
...
@@ -331,7 +331,16 @@ function buildModelCommand(command) {
...
@@ -331,7 +331,16 @@ function buildModelCommand(command) {
"
--format=csv,noheader,nounits
"
"
--format=csv,noheader,nounits
"
].
join
(
"
"
);
].
join
(
"
"
);
}
}
return
"
hy-smi --showproductname
"
;
return
buildHySmiCommand
(
"
--showproductname
"
);
}
function
buildHySmiCommand
(
args
)
{
const
command
=
[
"
hy-smi
"
,
args
].
filter
(
Boolean
).
join
(
"
"
);
return
`(
${
command
}
2>/dev/null || bash -ilc
${
shellQuote
(
command
)}
)`
;
}
function
shellQuote
(
value
)
{
return
`'
${
String
(
value
).
replace
(
/'/g
,
`'\\''`
)}
'`
;
}
}
function
persistDetectedServerInfo
(
serverId
,
detected
)
{
function
persistDetectedServerInfo
(
serverId
,
detected
)
{
...
...
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