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