Changeset 7da80b5 in nscp for trunk/modules/CheckSystem/PDHCollector.cpp
- Timestamp:
- 05/23/05 21:24:32 (8 years ago)
- Children:
- e93e741
- Parents:
- 3b8eb61
- File:
-
- 1 edited
-
trunk/modules/CheckSystem/PDHCollector.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/CheckSystem/PDHCollector.cpp
r3b8eb61 r7da80b5 36 36 37 37 /** 38 * Thread that collects the data every "CHECK_INTERVAL" seconds.39 *40 * @param lpParameter Not used41 * @return thread exit status42 *43 * @author mickem44 *45 * @date 03-13-200446 *47 * @bug If we have "custom named" counters ?48 * @bug This whole concept needs work I think.49 *50 */38 * Thread that collects the data every "CHECK_INTERVAL" seconds. 39 * 40 * @param lpParameter Not used 41 * @return thread exit status 42 * 43 * @author mickem 44 * 45 * @date 03-13-2004 46 * 47 * @bug If we have "custom named" counters ? 48 * @bug This whole concept needs work I think. 49 * 50 */ 51 51 DWORD PDHCollector::threadProc(LPVOID lpParameter) { 52 52 PDH::PDHQuery pdh; … … 103 103 104 104 /** 105 * Request termination of the thread (waiting for thread termination is not handled)106 */105 * Request termination of the thread (waiting for thread termination is not handled) 106 */ 107 107 void PDHCollector::exitThread(void) { 108 108 MutexLock mutex(mutexHandler); … … 116 116 if (!SetEvent(hStopEvent_)) { 117 117 NSC_LOG_ERROR_STD("SetStopEvent failed"); 118 }118 } 119 119 } 120 120 /** 121 * Get the average CPU usage for "time"122 * @param time Time to check123 * @return average CPU usage124 */121 * Get the average CPU usage for "time" 122 * @param time Time to check 123 * @return average CPU usage 124 */ 125 125 int PDHCollector::getCPUAvrage(std::string time) { 126 126 unsigned int mseconds = strEx::stoui_as_time(time, checkIntervall_*100); … … 133 133 } 134 134 /** 135 * Get uptime from counter136 * @bug Do we need to collect this all the time ? (perhaps we can collect this in real time ?)137 * @return uptime for the system138 * @bug Are we overflow protected here ? (seem to recall some issues with overflow before ?)139 */135 * Get uptime from counter 136 * @bug Do we need to collect this all the time ? (perhaps we can collect this in real time ?) 137 * @return uptime for the system 138 * @bug Are we overflow protected here ? (seem to recall some issues with overflow before ?) 139 */ 140 140 long long PDHCollector::getUptime() { 141 141 MutexLock mutex(mutexHandler); … … 147 147 } 148 148 /** 149 * Memory commit limit (your guess is as good as mine to what this is :)150 * @return Some form of memory check151 */149 * Memory commit limit (your guess is as good as mine to what this is :) 150 * @return Some form of memory check 151 */ 152 152 long long PDHCollector::getMemCommitLimit() { 153 153 MutexLock mutex(mutexHandler); … … 159 159 } 160 160 /** 161 *162 * Memory committed bytes (your guess is as good as mine to what this is :)163 * @return Some form of memory check164 */161 * 162 * Memory committed bytes (your guess is as good as mine to what this is :) 163 * @return Some form of memory check 164 */ 165 165 long long PDHCollector::getMemCommit() { 166 166 MutexLock mutex(mutexHandler);
Note: See TracChangeset
for help on using the changeset viewer.








