Changeset e93e741 in nscp for trunk/modules/CheckSystem
- Timestamp:
- 05/29/05 20:58:08 (8 years ago)
- Children:
- 24f7192
- Parents:
- 7da80b5
- Location:
- trunk/modules/CheckSystem
- Files:
-
- 3 edited
-
CheckSystem.cpp (modified) (3 diffs)
-
PDHCollector.cpp (modified) (2 diffs)
-
PDHCollector.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/CheckSystem/CheckSystem.cpp
r7da80b5 re93e741 593 593 try { 594 594 PDH::PDHQuery pdh; 595 PDHCollectors::StaticPDHCounterListener Intcounter;595 PDHCollectors::StaticPDHCounterListener<double, PDH_FMT_DOUBLE> counter; 596 596 std::string name = (*it).first; 597 597 if (name.empty()) … … 601 601 pdh.collect(); 602 602 if (bNSCLientCompatible) { 603 // std::cout << counter.getValue() << std::endl;604 603 msg += strEx::itos(counter.getValue()); 605 604 } else { … … 632 631 if (msg.empty()) 633 632 msg = "OK all counters within bounds."; 634 else 633 else if (!bNSCLientCompatible) 635 634 msg = NSCHelper::translateReturn(returnCode) + ": " + msg; 636 635 return returnCode; -
trunk/modules/CheckSystem/PDHCollector.cpp
r7da80b5 re93e741 50 50 */ 51 51 DWORD PDHCollector::threadProc(LPVOID lpParameter) { 52 hStopEvent_ = CreateEvent(NULL, TRUE, FALSE, NULL); 53 if (!hStopEvent_) { 54 NSC_LOG_ERROR_STD("Create StopEvent failed: " + strEx::itos(GetLastError())); 55 return 0; 56 } 52 57 PDH::PDHQuery pdh; 53 58 pdh.addCounter(NSCModuleHelper::getSettingsString(C_SYSTEM_SECTION_TITLE, C_SYSTEM_MEM_PAGE_LIMIT, C_SYSTEM_MEM_PAGE_LIMIT_DEFAULT), &memCmtLim); … … 63 68 } 64 69 65 hStopEvent_ = CreateEvent(NULL, TRUE, FALSE, NULL);66 if (!hStopEvent_) {67 NSC_LOG_ERROR_STD("Create StopEvent failed: " + strEx::itos(GetLastError()));68 return 0;69 }70 70 71 71 do { -
trunk/modules/CheckSystem/PDHCollector.h
r7da80b5 re93e741 30 30 int checkIntervall_; 31 31 32 PDHCollectors::StaticPDHCounterListener IntmemCmtLim;33 PDHCollectors::StaticPDHCounterListener IntmemCmt;34 PDHCollectors::StaticPDHCounterListener IntupTime;35 PDHCollectors::RoundINTPDHBufferListener cpu;32 PDHCollectors::StaticPDHCounterListener<__int64, PDH_FMT_LARGE> memCmtLim; 33 PDHCollectors::StaticPDHCounterListener<__int64, PDH_FMT_LARGE> memCmt; 34 PDHCollectors::StaticPDHCounterListener<__int64, PDH_FMT_LARGE> upTime; 35 PDHCollectors::RoundINTPDHBufferListener<__int64, PDH_FMT_LARGE> cpu; 36 36 37 37 public:
Note: See TracChangeset
for help on using the changeset viewer.








