Changeset a1e1922 in nscp


Ignore:
Timestamp:
02/23/05 08:25:55 (8 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
36c340d
Parents:
db70efa
Message:

Added ChekDIsk plugin (and some utility functions)

Files:
6 added
6 edited

Legend:

Unmodified
Added
Removed
  • include/strEx.h

    ra0528c4 ra1e1922  
    2222    return ss.str(); 
    2323  } 
    24   inline stoi(std::string s) { 
     24  inline int stoi(std::string s) { 
    2525    return atoi(s.c_str()); 
     26  } 
     27  inline long long stoi64_as_BKMG(std::string s) { 
     28    std::string::size_type p = s.find_first_of("BMKG"); 
     29    if (p == std::string::npos) 
     30      return _atoi64(s.c_str()); 
     31    else if (s[p] == 'B')  
     32      return _atoi64(s.c_str()); 
     33    else if (s[p] == 'K')  
     34      return _atoi64(s.c_str())*1024; 
     35    else if (s[p] == 'M')  
     36      return _atoi64(s.c_str())*1024*1024; 
     37    else if (s[p] == 'G')  
     38      return _atoi64(s.c_str())*1024*1024*1024; 
     39    else 
     40      return _atoi64(s.c_str()); 
     41  } 
     42  inline std::string itos_as_BKMG(long long i) { 
     43    if (i > (1024*1024*1024)) 
     44      return itos(i/(1024*1024*1024))+"G (" + itos(i) + "B)"; 
     45    if (i > (1024*1024)) 
     46      return itos(i/(1024*1024))+"M (" + itos(i) + "B)"; 
     47    if (i > (1024)) 
     48      return itos(i/(1024))+"K (" + itos(i) + "B)"; 
     49    return itos(i>>24)+"B"; 
    2650  } 
    2751  inline std::pair<std::string,std::string> split(std::string str, std::string key) { 
  • modules/CheckEventLog/stdafx.h

    ra0528c4 ra1e1922  
    1313#include <string> 
    1414 
     15 
    1516#include <NSCAPI.h> 
    1617#include <NSCHelper.h> 
  • modules/NSClientCompat/NSClientCompat.vcproj

    ra0528c4 ra1e1922  
    163163      </File> 
    164164      <File 
    165         RelativePath="..\include\ModuleHelper.h"> 
    166       </File> 
    167       <File 
    168165        RelativePath="..\..\include\NSCHelper.h"> 
    169166      </File> 
     
    178175      </File> 
    179176      <File 
    180         RelativePath="..\include\PDHCollectors.h"> 
    181       </File> 
    182       <File 
    183         RelativePath="..\include\PDHCounter.h"> 
     177        RelativePath="..\..\include\PDHCollectors.h"> 
    184178      </File> 
    185179      <File 
  • modules/NSClientCompat/PDHCollector.cpp

    ra0528c4 ra1e1922  
    2020#include "stdafx.h" 
    2121#include "PDHCollector.h" 
     22 
     23 
     24PDHCollector::PDHCollector() : cpu(BACK_INTERVAL*60/CHECK_INTERVAL), running_(true) { 
     25} 
     26PDHCollector::~PDHCollector()  
     27{ 
     28} 
    2229 
    2330/** 
  • modules/NSClientCompat/PDHCollector.h

    ra0528c4 ra1e1922  
    3535 
    3636public: 
    37   PDHCollector() : cpu(BACK_INTERVAL*60/CHECK_INTERVAL), running_(true) { 
    38   } 
     37  PDHCollector(); 
     38  virtual ~PDHCollector(); 
    3939  DWORD threadProc(LPVOID lpParameter); 
    4040  void exitThread(void); 
  • modules/SysTray/TrayIcon.cpp

    r3baaa4d ra1e1922  
    116116    }  
    117117  } 
     118  removeIcon(); 
    118119 
    119120  ::DestroyWindow(ghDlgWnd); 
Note: See TracChangeset for help on using the changeset viewer.