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
b2ceb1cb
Commit
b2ceb1cb
authored
Feb 28, 2020
by
Michael Ott
Browse files
Report correct message rates for Lenovo XCC metrics
parent
f384aa77
Changes
2
Hide whitespace changes
Inline
Side-by-side
dcdbpusher/sensors/ipmi/IPMISensorGroup.cpp
View file @
b2ceb1cb
...
...
@@ -49,6 +49,24 @@ IPMISensorGroup &IPMISensorGroup::operator=(const IPMISensorGroup &other) {
return
*
this
;
}
float
IPMISensorGroup
::
getMsgRate
()
{
float
msgRate
=
0
;
for
(
const
auto
&
s
:
_sensors
)
{
switch
(
s
->
getType
())
{
case
IPMISensorBase
::
sensorType
::
xccDatastorePower
:
case
IPMISensorBase
::
sensorType
::
xccBulkPower
:
msgRate
+=
100.0
f
/
_minValues
;
break
;
case
IPMISensorBase
::
sensorType
::
xccBulkEnergy
:
msgRate
+=
101.0
f
/
_minValues
;
break
;
default:
msgRate
+=
SensorGroupTemplate
::
getMsgRate
();
}
}
return
msgRate
;
}
uint64_t
IPMISensorGroup
::
readRaw
(
const
std
::
vector
<
uint8_t
>
&
rawCmd
,
uint8_t
lsb
,
uint8_t
msb
)
{
uint8_t
buf
[
256
];
int
len
=
-
1
;
...
...
dcdbpusher/sensors/ipmi/IPMISensorGroup.h
View file @
b2ceb1cb
...
...
@@ -43,6 +43,7 @@ class IPMISensorGroup : public SensorGroupTemplateEntity<IPMISensorBase, IPMIHos
IPMISensorGroup
(
const
IPMISensorGroup
&
other
);
virtual
~
IPMISensorGroup
();
IPMISensorGroup
&
operator
=
(
const
IPMISensorGroup
&
other
);
float
getMsgRate
()
final
override
;
uint64_t
nextReadingTime
()
override
;
bool
checkConfig
();
void
execOnInit
()
final
override
;
...
...
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