Changeset 36c340d in nscp for modules/NSClientCompat
- Timestamp:
- 02/25/05 21:47:45 (8 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 8223547
- Parents:
- a1e1922
- Location:
- modules/NSClientCompat
- Files:
-
- 3 edited
-
NSClientCompat.cpp (modified) (1 diff)
-
NSClientCompat.vcproj (modified) (2 diffs)
-
PDHCollector.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/NSClientCompat/NSClientCompat.cpp
r3baaa4d r36c340d 47 47 */ 48 48 bool NSClientCompat::unloadModule() { 49 if (!pdhThread.exitThread( ))49 if (!pdhThread.exitThread(20000)) 50 50 NSC_LOG_ERROR("Could not exit the thread, memory leak and potential corruption may be the result..."); 51 51 return true; -
modules/NSClientCompat/NSClientCompat.vcproj
ra1e1922 r36c340d 113 113 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 114 114 </Configuration> 115 <Configuration 116 Name="Dynamic Linkage|Win32" 117 OutputDirectory="$(ConfigurationName)" 118 IntermediateDirectory="$(ConfigurationName)" 119 ConfigurationType="2" 120 CharacterSet="2"> 121 <Tool 122 Name="VCCLCompilerTool" 123 AdditionalIncludeDirectories="../include;../../include" 124 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 125 RuntimeLibrary="2" 126 UsePrecompiledHeader="3" 127 WarningLevel="3" 128 Detect64BitPortabilityProblems="TRUE" 129 DebugInformationFormat="3"/> 130 <Tool 131 Name="VCCustomBuildTool"/> 132 <Tool 133 Name="VCLinkerTool" 134 AdditionalDependencies="Pdh.lib" 135 OutputFile="../../Release/modules/$(ProjectName).dll" 136 LinkIncremental="1" 137 ModuleDefinitionFile="NSClientCompat.def" 138 GenerateDebugInformation="TRUE" 139 SubSystem="2" 140 OptimizeReferences="2" 141 EnableCOMDATFolding="2" 142 ImportLibrary="$(OutDir)/NSClientCompat.lib" 143 TargetMachine="1"/> 144 <Tool 145 Name="VCMIDLTool"/> 146 <Tool 147 Name="VCPostBuildEventTool"/> 148 <Tool 149 Name="VCPreBuildEventTool"/> 150 <Tool 151 Name="VCPreLinkEventTool"/> 152 <Tool 153 Name="VCResourceCompilerTool"/> 154 <Tool 155 Name="VCWebServiceProxyGeneratorTool"/> 156 <Tool 157 Name="VCXMLDataGeneratorTool"/> 158 <Tool 159 Name="VCWebDeploymentTool"/> 160 <Tool 161 Name="VCManagedWrapperGeneratorTool"/> 162 <Tool 163 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 164 </Configuration> 165 <Configuration 166 Name="Debug Dynamic Linkage|Win32" 167 OutputDirectory="$(ConfigurationName)" 168 IntermediateDirectory="$(ConfigurationName)" 169 ConfigurationType="2" 170 CharacterSet="2"> 171 <Tool 172 Name="VCCLCompilerTool" 173 Optimization="0" 174 AdditionalIncludeDirectories="../include;../../include" 175 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_STLP_USE_NEWALLOC;_STLP_DEBUG=1" 176 MinimalRebuild="TRUE" 177 BasicRuntimeChecks="3" 178 RuntimeLibrary="3" 179 UsePrecompiledHeader="3" 180 WarningLevel="3" 181 Detect64BitPortabilityProblems="TRUE" 182 DebugInformationFormat="4"/> 183 <Tool 184 Name="VCCustomBuildTool"/> 185 <Tool 186 Name="VCLinkerTool" 187 AdditionalDependencies="Pdh.lib" 188 OutputFile="../../Debug/modules/$(ProjectName).dll" 189 LinkIncremental="2" 190 ModuleDefinitionFile="NSClientCompat.def" 191 GenerateDebugInformation="TRUE" 192 ProgramDatabaseFile="$(OutDir)/NSClientCompat.pdb" 193 SubSystem="2" 194 ImportLibrary="$(OutDir)/NSClientCompat.lib" 195 TargetMachine="1"/> 196 <Tool 197 Name="VCMIDLTool"/> 198 <Tool 199 Name="VCPostBuildEventTool"/> 200 <Tool 201 Name="VCPreBuildEventTool"/> 202 <Tool 203 Name="VCPreLinkEventTool"/> 204 <Tool 205 Name="VCResourceCompilerTool"/> 206 <Tool 207 Name="VCWebServiceProxyGeneratorTool"/> 208 <Tool 209 Name="VCXMLDataGeneratorTool"/> 210 <Tool 211 Name="VCWebDeploymentTool"/> 212 <Tool 213 Name="VCManagedWrapperGeneratorTool"/> 214 <Tool 215 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 216 </Configuration> 115 217 </Configurations> 116 218 <References> … … 153 255 UsePrecompiledHeader="1"/> 154 256 </FileConfiguration> 257 <FileConfiguration 258 Name="Dynamic Linkage|Win32"> 259 <Tool 260 Name="VCCLCompilerTool" 261 UsePrecompiledHeader="1"/> 262 </FileConfiguration> 263 <FileConfiguration 264 Name="Debug Dynamic Linkage|Win32"> 265 <Tool 266 Name="VCCLCompilerTool" 267 UsePrecompiledHeader="1"/> 268 </FileConfiguration> 155 269 </File> 156 270 </Filter> -
modules/NSClientCompat/PDHCollector.cpp
ra1e1922 r36c340d 85 85 pdh.addCounter("\\\\.\\Processor(_total)\\% Processor Time", &cpu); 86 86 87 pdh.open(); 87 try { 88 pdh.open(); 89 } catch (const PDH::PDHException &e) { 90 NSC_LOG_ERROR_STD("Failed to open performance counters: " + e.str_); 91 return 0; 92 } 88 93 89 94 startRunning(); … … 93 98 if (!mutex.hasMutex()) 94 99 NSC_LOG_ERROR("Failed to get Mutex!"); 95 else 96 pdh.collect(); 100 else { 101 try { 102 pdh.collect(); 103 } catch (const PDH::PDHException &e) { 104 NSC_LOG_ERROR_STD("Failed to query performance counters: " + e.str_); 105 } 106 } 97 107 } 98 108 Sleep(CHECK_INTERVAL*1000); 99 109 } 100 110 101 pdh.close(); 111 try { 112 pdh.close(); 113 } catch (const PDH::PDHException &e) { 114 NSC_LOG_ERROR_STD("Failed to close performance counters: " + e.str_); 115 } 102 116 NSC_DEBUG_MSG("PDHCollector - shutdown!"); 103 117 return 0; … … 153 167 /** 154 168 * 155 * Memory commit ed bytes (your guess is as good as mine to what this is :)169 * Memory committed bytes (your guess is as good as mine to what this is :) 156 170 * @return Some form of memory check 157 171 */
Note: See TracChangeset
for help on using the changeset viewer.








