Worker ID

Maxim Dounin mdounin at mdounin.ru
Thu May 15 12:12:12 UTC 2014


Hello!

On Wed, May 14, 2014 at 09:10:04PM -0400, Jordan Newman wrote:

> Thanks, ngx_process_slot was what I needed.  The reason for 
> knowing the worker # is for stat tracking, its important that 
> the backend where the stats are being collected on knows to 
> group them together by worker and then by server.

For this use case it should be fine to use just a process id of a 
worker.  It's as available in the ngx_pid global variable (and as 
the $pid nginx variable).

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list