Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gpuhw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
gpuhw
Commits
a9dd8628
Commit
a9dd8628
authored
May 29, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to monitor-smi:v.0.0.5
parent
a6fdb093
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
cpu-smi.go
cpu-smi.go
+5
-0
docker-compose-smi.yml
docker-compose-smi.yml
+1
-1
gpuhw-smi
gpuhw-smi
+0
-0
No files found.
cpu-smi.go
View file @
a9dd8628
...
...
@@ -18,6 +18,8 @@ func CpuSmi() (Cpu, error) {
cores
:=
0
physicalMap
:=
make
(
map
[
string
]
bool
)
model
:=
""
for
_
,
info
:=
range
infos
{
...
...
@@ -29,6 +31,8 @@ func CpuSmi() (Cpu, error) {
if
len
(
model
)
==
0
{
model
=
info
.
ModelName
}
physicalMap
[
info
.
PhysicalID
]
=
true
}
idx
:=
strings
.
IndexAny
(
model
,
"@"
)
...
...
@@ -53,6 +57,7 @@ func CpuSmi() (Cpu, error) {
return
Cpu
{
Model
:
model
,
Number
:
int64
(
len
(
physicalMap
)),
Cores
:
int64
(
c
),
Threads
:
int64
(
len
(
infos
)),
Usage
:
percentAsInt
,
...
...
docker-compose-smi.yml
View file @
a9dd8628
...
...
@@ -2,7 +2,7 @@ version: "3.9"
services
:
monitorSmi
:
image
:
docker.ai.17xuexi.com/monitorapi/monitor-smi:v.0.0.
4
image
:
docker.ai.17xuexi.com/monitorapi/monitor-smi:v.0.0.
5
network_mode
:
host
volumes
:
-
/proc:/host/proc:ro
...
...
gpuhw-smi
View file @
a9dd8628
No preview for this file type
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