Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
dcdb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
dcdb
dcdb
Commits
a6818d68
Commit
a6818d68
authored
Feb 25, 2019
by
lu43jih
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing bug when stopping sensor
parent
303bc910
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Makefile
Makefile
+1
-1
src/sensors/msr/MSRSensorGroup.cpp
src/sensors/msr/MSRSensorGroup.cpp
+5
-5
No files found.
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,13 +69,14 @@ void MSRSensorGroup::start() {
}
void
MSRSensorGroup
::
stop
()
{
//close file descriptors and leave counters running freely
_keepRunning
=
0
;
//close file descriptors and leave counters running freely
for
(
auto
&
kv
:
cpuToFd
)
{
close
(
kv
.
second
);
kv
.
second
=
-
1
;
}
LOG
(
info
)
<<
"Sensorgroup "
<<
_groupName
<<
" stopped."
;
LOG
(
info
)
<<
"Sensorgroup "
<<
_groupName
<<
" stopped."
;
}
void
MSRSensorGroup
::
read
()
{
...
...
@@ -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
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