Changeset ee230f7 in nscp for modules/CheckSystem/PDHCollector.h
- Timestamp:
- 08/04/12 07:34:11 (10 months ago)
- Branches:
- master, 0.4.1, 0.4.2
- Children:
- c91916f
- Parents:
- 6aac723
- File:
-
- 1 edited
-
modules/CheckSystem/PDHCollector.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/CheckSystem/PDHCollector.h
rc391984 ree230f7 21 21 #pragma once 22 22 23 #include <boost/thread.hpp> 24 23 25 #include <pdh.hpp> 24 #include <thread.h>25 #include <MutexRW.h>26 26 #include <boost/unordered_map.hpp> 27 27 #include <boost/shared_ptr.hpp> … … 105 105 unsigned int check_intervall; 106 106 std::wstring buffer_length; 107 std::wstring subsystem; 107 108 108 109 std::list<counter> counters; … … 111 112 private: 112 113 113 //system_counter_data *data_; 114 MutexRW mutex_; 115 HANDLE hStopEvent_; 114 boost::shared_mutex mutex_; 115 HANDLE stop_event_; 116 116 typedef boost::shared_ptr<PDHCollectors::PDHCollector> collector_ptr; 117 117 typedef boost::unordered_map<std::wstring,collector_ptr > counter_map; 118 118 counter_map counters_; 119 119 int check_intervall_; 120 boost::shared_ptr<boost::thread> thread_; 121 boost::shared_ptr<system_counter_data> thread_data_; 120 122 121 123 public: 122 124 PDHCollector(); 123 125 virtual ~PDHCollector(); 124 DWORD threadProc(LPVOID lpParameter);126 void thread_proc(); 125 127 void exitThread(void); 126 128 … … 135 137 double get_avg_value(std::wstring counter, unsigned int delta); 136 138 double get_double(std::wstring counter); 139 void start(boost::shared_ptr<system_counter_data> data); 140 bool stop(); 137 141 }; 138 139 140 typedef Thread<PDHCollector> PDHCollectorThread;
Note: See TracChangeset
for help on using the changeset viewer.








