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
8efae39d
Commit
8efae39d
authored
May 30, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to monitor.dcgm:v.0.0.9
parent
3fff37f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
cpu.go
cpu.go
+2
-2
docker-compose-dcgm.yml
docker-compose-dcgm.yml
+1
-1
prometheus.yml
prometheus.yml
+2
-2
monitorapi
test/monitorapi
+0
-0
No files found.
cpu.go
View file @
8efae39d
...
@@ -87,12 +87,12 @@ func (c *ProApi) Cpus() (Cpu, error) {
...
@@ -87,12 +87,12 @@ func (c *ProApi) Cpus() (Cpu, error) {
// node_cpu_seconds_total{mode="idle"}
// node_cpu_seconds_total{mode="idle"}
func
(
c
ProApi
)
CpuItems
()
(
string
,
int
,
int
,
int
,
error
)
{
func
(
c
ProApi
)
CpuItems
()
(
string
,
int
,
int
,
int
,
error
)
{
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
10
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
defer
cancel
()
defer
cancel
()
queryParam
:=
`node_cpu_info`
queryParam
:=
`node_cpu_info`
result
,
warnings
,
err
:=
c
.
API
.
Query
(
ctx
,
queryParam
,
time
.
Now
(),
v1
.
WithTimeout
(
5
*
time
.
Second
))
result
,
warnings
,
err
:=
c
.
API
.
Query
(
ctx
,
queryParam
,
time
.
Now
(),
v1
.
WithTimeout
(
time
.
Second
))
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
0
,
0
,
0
,
err
return
""
,
0
,
0
,
0
,
err
}
}
...
...
docker-compose-dcgm.yml
View file @
8efae39d
...
@@ -2,7 +2,7 @@ version: "3.9"
...
@@ -2,7 +2,7 @@ version: "3.9"
services
:
services
:
monitor.dcgm
:
monitor.dcgm
:
image
:
docker.ai.17xuexi.com/monitorapi/monitor.dcgm:v.0.0.
8
image
:
docker.ai.17xuexi.com/monitorapi/monitor.dcgm:v.0.0.
9
ports
:
ports
:
-
9093:9090
-
9093:9090
-
4000:4000
-
4000:4000
...
...
prometheus.yml
View file @
8efae39d
global
:
global
:
scrape_interval
:
1
s
scrape_interval
:
300m
s
evaluation_interval
:
1
s
evaluation_interval
:
300m
s
scrape_configs
:
scrape_configs
:
-
job_name
:
prometheus
-
job_name
:
prometheus
...
...
test/monitorapi
View file @
8efae39d
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