# Stats for each worker process

**URL:** <https://www.ruby-forum.com/t/stats-for-each-worker-process/183674>\
**Category:** NGINX\
**Created:** [February 18, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/stats-for-each-worker-process/183674 "2010-02-18T16:57:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giuseppe\_furlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e95f7d/32.png) [@giuseppe\_furlan](https://www.ruby-forum.com/u/giuseppe_furlan)\
**Post date:** [February 18, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/stats-for-each-worker-process/183674/1 "2010-02-18T16:57:42Z")

</div>

hello all,

I’m wondering if there is a way to get stats for each worker process.  
If I use NginxHttpStubStatusModule then I get global stats but I’d like  
to get the status of each worker, the number of requests that  
worker has performed, the total number of bytes served by  
the worker, the current percentage CPU used by each worker.

Thanks in advance  
Giuseppe

---

<div class="post-metadata">

**Author:** ![giuseppe\_furlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e95f7d/32.png) [@giuseppe\_furlan](https://www.ruby-forum.com/u/giuseppe_furlan)\
**Post date:** [February 18, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/stats-for-each-worker-process/183674/2 "2010-02-18T17:15:51Z")

</div>

I can separate the status to the vip (http site). See my config, hope  
this help.

http {

```
    error_log /var/log/nginx/error.abc.def.com.log;

    access_log /var/log/nginx/access.abc.def.com.log;

    server {

            listen abc.def.com:443;

            server_name abc.def.com;

            ssl on;

            ssl_session_cache shared:SSL:10m;

            keepalive_timeout 75;

            ssl_session_timeout 10m;

            ssl_certificate /etc/ssl/ abc.def.pem;

            ssl_certificate_key /etc/ssl/abc.def.pem;

            proxy_redirect off;

            proxy_set_header Host $host;

            proxy_set_header X-Real-IP $remote_addr;

            proxy_set_header X-Forwarded-For

```

$proxy\_add\_x\_forwarded\_for;

```
            proxy_set_header X-FORWARDED_PROTO http;

            proxy_connect_timeout 300;

            location / { proxy_pass

```

[http://10.10.10.10:9002/something/under/this?saflsajfl](http://10.10.10.10:9002/something/under/this?saflsajfl); }

```
            location /nwa { proxy_pass http://

```

10.10.10.13:9002/something/under/this?saflsajfl/sdfsdf; }

```
            location /test/admin { proxy_pass http://

```

10.10.10.10:9002/something/under/this?saflsajfl/test; }

```
            location /test { proxy_pass http://

```

10.10.10.11:9002/something/under; }

```
            location /wordpress { proxy_pass http://

```

10.10.10.10:9001/something/under/wordpress; }

```
            location /nginx_status {

                    stub_status on;

                    access_log off;

            }

}

```

}

Danny Trinh

Linux Admin

From: giuseppe furlan [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
Sent: Thursday, February 18, 2010 9:57 AM  
To: removed\_email\_address@domain.invalid  
Subject: stats for each worker process

hello all,

I’m wondering if there is a way to get stats for each worker process.  
If I use NginxHttpStubStatusModule then I get global stats but I’d like  
to get the status of each worker, the number of requests that worker has  
performed, the total number of bytes served by the worker, the current  
percentage CPU used by each worker.

Thanks in advance  
Giuseppe

* * *

Not got a Hotmail account? Sign-up now - Free  
[http://clk.atdmt.com/UKM/go/197222280/direct/01/](http://clk.atdmt.com/UKM/go/197222280/direct/01/)

---

<div class="post-metadata">

**Author:** ![giuseppe\_furlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e95f7d/32.png) [@giuseppe\_furlan](https://www.ruby-forum.com/u/giuseppe_furlan)\
**Post date:** [February 19, 2010, 9:19am UTC](https://www.ruby-forum.com/t/stats-for-each-worker-process/183674/3 "2010-02-19T09:19:54Z")

</div>

Can you get stats for each worker process with your configuration ?

According to stub\_status module I’m not able to get statistics (bytes  
served, cpu used, requests etc) for each worker process.

Giuseppe

Date: Thu, 18 Feb 2010 10:14:55 -0600  
From: removed\_email\_address@domain.invalid  
To: removed\_email\_address@domain.invalid  
Subject: RE: stats for each worker process

I can separate the status to the vip (http site). See my config,  
hope this help.

http {

error\_log /var/log/nginx/error.abc.def.com.log;

access\_log /var/log/nginx/access.abc.def.com.log;

```
    server {

```

listen [abc.def.com:443](http://abc.def.com:443);

server\_name [abc.def.com](http://abc.def.com);

ssl on;

ssl\_session\_cache shared:SSL:10m;

keepalive\_timeout  
75;

ssl\_session\_timeout 10m;

ssl\_certificate /etc/ssl/ abc.def.pem;

ssl\_certificate\_key /etc/ssl/abc.def.pem;

proxy\_redirect off;

proxy\_set\_header  
Host  
$host;

proxy\_set\_header  
X-Real-IP $remote\_addr;

proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;

proxy\_set\_header X-FORWARDED\_PROTO http;

proxy\_connect\_timeout 300;

location / { proxy\_pass  
[http://10.10.10.10:9002/something/under/this?saflsajfl](http://10.10.10.10:9002/something/under/this?saflsajfl);  
}

location /nwa { proxy\_pass http://  
10.10.10.13:9002/something/under/this?saflsajfl/sdfsdf;  
}

location /test/admin { proxy\_pass http://  
10.10.10.10:9002/something/under/this?saflsajfl/test;  
}

location /test { proxy\_pass http:// 10.10.10.11:9002/something/under; }

location /wordpress { proxy\_pass  
http:// 10.10.10.10:9001/something/under/wordpress; }

location /nginx\_status {

stub\_status on;

access\_log off;

}

```
}

```

}

Danny Trinh

Linux Admin

From: giuseppe furlan  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]

Sent: Thursday, February 18, 2010 9:57 AM

To: removed\_email\_address@domain.invalid

Subject: stats for each worker process

hello all,

I’m wondering if there is a way to get stats for each worker process.

If I use NginxHttpStubStatusModule then I get global stats but I’d like  
to get  
the status of each worker, the number of requests that worker has  
performed,  
the total number of bytes served by the worker, the current percentage  
CPU used  
by each worker.

Thanks in advance

Giuseppe

Not  
got a Hotmail account? Sign-up  
now - Free
