Ignore:
Timestamp:
05/23/05 21:24:32 (8 years ago)
Author:
Michael Medin <michael@…>
Children:
e93e741
Parents:
3b8eb61
Message:

2005-05-23 MickeM

+ Added obfuscated password support
+ Added some more debug info on commands (returncode, and input args)
+ Added some more comments ot the NSC.ini
+ Added central password "override"
+ Added central "host override"
+ Fixed bug with external commands always getting WARNING state

2005-05-22 MickeM

+ Added debug outout for command
+ Added timestamps for log-to-file (date_mask to configure format)
+ Added support for "no password" with check_nt
+ Added log of bad password on NSClient requests.

  • Some threading issues fixed (I hate threading :)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/CheckSystem/PDHCollector.cpp

    r3b8eb61 r7da80b5  
    3636 
    3737/** 
    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  */ 
     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*/ 
    5151DWORD PDHCollector::threadProc(LPVOID lpParameter) { 
    5252  PDH::PDHQuery pdh; 
     
    103103 
    104104/** 
    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*/ 
    107107void PDHCollector::exitThread(void) { 
    108108  MutexLock mutex(mutexHandler); 
     
    116116    if (!SetEvent(hStopEvent_)) { 
    117117      NSC_LOG_ERROR_STD("SetStopEvent failed"); 
    118   } 
     118    } 
    119119} 
    120120/** 
    121  * Get the average CPU usage for "time" 
    122  * @param time Time to check  
    123  * @return average CPU usage 
    124  */ 
     121* Get the average CPU usage for "time" 
     122* @param time Time to check  
     123* @return average CPU usage 
     124*/ 
    125125int PDHCollector::getCPUAvrage(std::string time) { 
    126126  unsigned int mseconds = strEx::stoui_as_time(time, checkIntervall_*100); 
     
    133133} 
    134134/** 
    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  */ 
     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*/ 
    140140long long PDHCollector::getUptime() { 
    141141  MutexLock mutex(mutexHandler); 
     
    147147} 
    148148/** 
    149  * Memory commit limit (your guess is as good as mine to what this is :) 
    150  * @return Some form of memory check 
    151  */ 
     149* Memory commit limit (your guess is as good as mine to what this is :) 
     150* @return Some form of memory check 
     151*/ 
    152152long long PDHCollector::getMemCommitLimit() { 
    153153  MutexLock mutex(mutexHandler); 
     
    159159} 
    160160/** 
    161  * 
    162  * Memory committed bytes (your guess is as good as mine to what this is :) 
    163  * @return Some form of memory check 
    164  */ 
     161* 
     162* Memory committed bytes (your guess is as good as mine to what this is :) 
     163* @return Some form of memory check 
     164*/ 
    165165long long PDHCollector::getMemCommit() { 
    166166  MutexLock mutex(mutexHandler); 
Note: See TracChangeset for help on using the changeset viewer.