mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
fix(performance): refine process distinction for Nginx worker and cache processes
This commit is contained in:
parent
16369bc635
commit
402de5d987
1 changed files with 2 additions and 2 deletions
|
@ -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++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue