Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
dcdb
dcdb
Commits
c4a3b55e
Commit
c4a3b55e
authored
Feb 21, 2020
by
Weronika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the compute runnning procesess sensor to the nvml plugin
parent
1e026fa8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
dcdbpusher/sensors/nvml/nvml.conf
dcdbpusher/sensors/nvml/nvml.conf
+6
-0
dcdbpusher/sensors/nvml/nvmlConfigurator.cpp
dcdbpusher/sensors/nvml/nvmlConfigurator.cpp
+1
-0
dcdbpusher/sensors/nvml/nvmlSensorBase.h
dcdbpusher/sensors/nvml/nvmlSensorBase.h
+4
-1
dcdbpusher/sensors/nvml/nvmlSensorGroup.cpp
dcdbpusher/sensors/nvml/nvmlSensorGroup.cpp
+5
-1
No files found.
dcdbpusher/sensors/nvml/nvml.conf
View file @
c4a3b55e
...
...
@@ -106,6 +106,12 @@ group nvml_g2 {
feature
GPU_PCIE_THRU
}
sensor
gpu_run_prcs
{
mqttsuffix
/
run_prcs
feature
GPU_RUN_PRCS
}
}
...
...
dcdbpusher/sensors/nvml/nvmlConfigurator.cpp
View file @
c4a3b55e
...
...
@@ -47,6 +47,7 @@ nvmlConfigurator::nvmlConfigurator() {
_gpuFeatureMAP
[
"GPU_UTL_GPU"
]
=
GPU_UTL_GPU
;
_gpuFeatureMAP
[
"GPU_ECC_ERR"
]
=
GPU_ECC_ERR
;
_gpuFeatureMAP
[
"GPU_PCIE_THRU"
]
=
GPU_PCIE_THRU
;
_gpuFeatureMAP
[
"GPU_RUN_PRCS"
]
=
GPU_RUN_PRCS
;
_groupName
=
"group"
;
_baseName
=
"sensor"
;
...
...
dcdbpusher/sensors/nvml/nvmlSensorBase.h
View file @
c4a3b55e
...
...
@@ -52,7 +52,7 @@ enum GPU_FEATURE {
GPU_UTL_GPU
=
11
,
GPU_ECC_ERR
=
13
,
GPU_PCIE_THRU
=
14
,
GPU_RUN_PRCS
=
15
,
};
/**
...
...
@@ -150,6 +150,9 @@ class nvmlSensorBase : public SensorBase {
case
GPU_PCIE_THRU
:
feature
=
"GPU_PCIE_THRU"
;
break
;
case
GPU_RUN_PRCS
:
feature
=
"GPU_RUN_PRCS"
;
break
;
}
LOG_VAR
(
ll
)
<<
leading
<<
" Feature type: "
<<
feature
;
}
...
...
dcdbpusher/sensors/nvml/nvmlSensorGroup.cpp
View file @
c4a3b55e
...
...
@@ -51,6 +51,7 @@ struct counters_t {
unsigned
long
long
ecc_counts
;
nvmlUtilization_t
utilization
;
unsigned
int
pcie_throughput
;
nvmlProcessInfo_t
running_prcs
;
}
counters
;
nvmlSensorGroup
::
nvmlSensorGroup
(
const
std
::
string
&
name
)
:
...
...
@@ -192,7 +193,10 @@ void nvmlSensorGroup::read() {
err
=
nvmlDeviceGetPcieThroughput
(
env
.
device
,
NVML_PCIE_UTIL_COUNT
,
&
(
counters
.
pcie_throughput
));
reading
.
value
=
counters
.
pcie_throughput
;
break
;
case
(
GPU_RUN_PRCS
):
err
=
nvmlDeviceGetComputeRunningProcesses
(
env
.
device
,
0
,
&
(
counters
.
running_prcs
));
reading
.
value
=
counters
.
running_prcs
.
pid
;
break
;
}
s
->
storeReading
(
reading
);
#ifdef DEBUG
...
...
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