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
a6818d68
Commit
a6818d68
authored
Feb 25, 2019
by
lu43jih
Browse files
removing bug when stopping sensor
parent
303bc910
Changes
2
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
a6818d68
...
...
@@ -19,7 +19,7 @@ CXXFLAGS = -std=c++11 -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_NETWORK_EN
LIBS
=
-L
../deps/mosquitto_build/lib
-L
$(DCDBDEPLOYPATH)
/lib/
-ldl
-lmosquitto
-lboost_system
-lboost_thread
-lboost_log_setup
-lboost_log
-lboost_regex
-lpthread
-lcrypto
-lssl
-lcppnetlib-server-parsers
-lcppnetlib-uri
-rdynamic
OBJS
=
src/dcdbpusher.o src/Configuration.o src/MQTTPusher.o src/HttpsServer.o src/analytics/AnalyticsManager.o src/analytics/SensorNavigator.o
PLUGINS
=
procfs pdu sysfs ipmi bacnet snmp gpfsmon tester
PLUGINS
=
procfs pdu sysfs ipmi bacnet snmp gpfsmon tester
msr
ANALYZERS
=
average
ifeq
($(OS),Darwin)
...
...
src/sensors/msr/MSRSensorGroup.cpp
View file @
a6818d68
...
...
@@ -42,7 +42,7 @@ void MSRSensorGroup::start() {
return
;
}
program_fixed
()
program_fixed
()
;
for
(
auto
&
kv
:
cpuToFd
)
{
int
cpu
=
kv
.
first
;
...
...
@@ -69,6 +69,7 @@ void MSRSensorGroup::start() {
}
void
MSRSensorGroup
::
stop
()
{
_keepRunning
=
0
;
//close file descriptors and leave counters running freely
for
(
auto
&
kv
:
cpuToFd
)
{
close
(
kv
.
second
);
...
...
@@ -163,11 +164,10 @@ void MSRSensorGroup::program_fixed(){
msr_write
(
IA32_CR_FIXED_CTR_CTRL
,
ctrl_reg
.
value
,
kv
.
first
);
// start counting, enable 3 fixed counters (enable also the programmables counters)
uint64
value
=
(
1ULL
<<
0
)
+
(
1ULL
<<
1
)
+
(
1ULL
<<
2
)
+
(
1ULL
<<
3
)
+
(
1ULL
<<
32
)
+
(
1ULL
<<
33
)
+
(
1ULL
<<
34
);
uint64
_t
value
=
(
1ULL
<<
0
)
+
(
1ULL
<<
1
)
+
(
1ULL
<<
2
)
+
(
1ULL
<<
3
)
+
(
1ULL
<<
32
)
+
(
1ULL
<<
33
)
+
(
1ULL
<<
34
);
//uint64_t value = (1ULL << 32) + (1ULL << 33) + (1ULL << 34);
msr_write
(
IA32_CR_PERF_GLOBAL_CTRL
,
value
,
kv
.
first
);
}
return
true
;
}
void
MSRSensorGroup
::
addCpu
(
unsigned
int
cpu
){
...
...
Write
Preview
Supports
Markdown
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