|
|
@@ -2948,6 +2948,7 @@ unordered_map<int, long long> oldProcessTime;
|
|
|
unordered_map<int, long long> newProcessTime;
|
|
|
unordered_map<int, CSimpleStringA> processName;
|
|
|
unordered_map<int, double> processCpu;
|
|
|
+string sysProcName = "[System Process]|System|Registry|smss.exe|csrss.exe|services.exe|wininit.exe";
|
|
|
|
|
|
bool cmp(const pair<int, double>& a, const pair<int, double>& b) {
|
|
|
return a.second > b.second;
|
|
|
@@ -3045,15 +3046,6 @@ void ResourceWatcherFSM::GetSystemCPUStatus()
|
|
|
processName[entityInfo.dwProcessID] = runInfo.strRunningEntityNames[i];
|
|
|
}
|
|
|
|
|
|
- unordered_map<const char*, int> sysProc;
|
|
|
- sysProc["[System Process]"] = 1;
|
|
|
- sysProc["System"] = 2;
|
|
|
- sysProc["Registry"] = 3;
|
|
|
- sysProc["smss.exe"] = 4;
|
|
|
- sysProc["csrss.exe"] = 5;
|
|
|
- sysProc["services.exe"] = 6;
|
|
|
- sysProc["wininit.exe"] = 7;
|
|
|
-
|
|
|
unordered_map<int, long long>::iterator it;
|
|
|
for (it = newProcessTime.begin(); it != newProcessTime.end(); ++it)
|
|
|
{
|
|
|
@@ -3064,7 +3056,7 @@ void ResourceWatcherFSM::GetSystemCPUStatus()
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if (sysProc.find(processName[tPid].GetData()) != sysProc.end())
|
|
|
+ if (sysProcName.find(processName[tPid].GetData()) != std::string::npos)
|
|
|
{
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("进程名:%s. 找到了,系统进程,不纳入统计。", processName[tPid]);
|
|
|
continue;
|