Quellcode durchsuchen

fix(performance): refine process distinction for Nginx worker and cache processes

Jacky vor 3 Wochen
Ursprung
Commit
402de5d987
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      internal/performance/process_info.go

+ 2 - 2
internal/performance/process_info.go

@@ -119,9 +119,9 @@ func GetNginxProcessInfo() (*NginxProcessInfo, error) {
 		}
 
 		// Distinguish between worker processes, cache processes, and other processes
-		if ppid == masterPID || strings.Contains(cmdline, "worker process") {
+		if ppid == masterPID && strings.Contains(cmdline, "worker process") {
 			workerCount++
-		} else if strings.Contains(cmdline, "cache") {
+		} else if ppid == masterPID && strings.Contains(cmdline, "cache") {
 			cacheCount++
 		} else {
 			otherCount++