1.      从网上下载多进程统计补丁。https://github.com/arut/nginx-patches

2.      Copy补丁文件per-worker-listener到nginx代码目录下。如\nginx-1.7.2

3.      打补丁:patch -p1 < per-worker-listener

4.      make &make install

5.      修改配置文件:

daemon on;
master_process on;
worker_processes 5;

events{
    worker_connections 1024;
    accept_mutex off;
}

#HTTP
http{
    
   upstream redis_pool {
        server localhost:6379;
        keepalive 1024 single;
    }

server {
        listen 8080;
        listen 10000 per_worker;//第一个worker从10000开始

}

}

6.     运行Nginx,并测试:

http://localhost:10000/stat

http://localhost:10001/stat

http://localhost:10002/stat

http://localhost:10003/stat

http://localhost:10004/stat

nginx statistics in multi-workers的更多相关文章

  1. Dash by Plotly 学习笔记

    一.介绍 1.dash 是什么 dash 是一个基于 Flask (Python) + React 的 web 框架. 入门指南:https://dash.plot.ly/getting-starte ...

  2. RandomForest in Spark MLLib

    决策树类模型 ml中的classification和regression主要基于以下几类: classification:决策树及其相关的集成算法,Logistics回归,多层感知模型: regres ...

  3. The first one spawns an additional process forwarding requests to a series of workers (think about it as a form of shield, at the same level of apache or nginx), while the second one sets workers to n

    Things to know (best practices and “issues”) READ IT !!! — uWSGI 2.0 documentationhttps://uwsgi-docs ...

  4. How to Configure Nginx for Optimized Performance

    Features Pricing Add-ons Resources | Log in Sign up   Guides & Tutorials Web Server Guides Nginx ...

  5. Docker部署Django项目+Nginx+Fluend日志收集 和redis、memcached、RabbitMQ、Celery

    前言 一.docker 1.docker是什么? Docker的英文本意是“搬运工”,Docker搬运的是集装箱(Container)可以成为容器,我可以把写的Django的WEB应用以及Python ...

  6. nginx HttpLuaModule

    http://wiki.nginx.org/HttpLuaModule#Directives Name ngx_lua - Embed the power of Lua into Nginx This ...

  7. Celery-4.1 用户指南: Workers Guide (Workers 指南)

    启动工作单元 你可以通过执行以下命令在前台启动工作单元: $ celery -A proj worker -l info 查看启动工作单元的可用命令行选项,可以执行: $ celery worker ...

  8. linux php nginx php-fpm 关系 动态进程生成

    yum install php yum install php-fpm 启动fpm [root@VM_141_64_centos html]# service php-fpm restart Redi ...

  9. 使用dockerfile 搭建django系统(nginx+redis+mongodb+celery)

    背景 有需求需要对django系统进行docker化,以达到灵活部署和容灾.该系统基于django 2.2版本开发,数据库采用mongodb,服务器使用nginx,因系统有部分异步任务,异步任务则采用 ...

随机推荐

  1. halocn/C++ (第一篇)

        在使用C++编写halcon之前,确定自己有较好的C++基础,并熟悉一套开发平台如VC   Programmers_guide.pdf chapter7中有关于creating Aplicat ...

  2. 解决xadmin下设置“use_bootswatch = True”无效的问题

    环境:python 2.7django 1.9xadmin采用源代码的方式引入到项目中QQ群交流:697028234 1.安装requests pip install requests 2./xadm ...

  3. 第1课:接口测试和jmeter总结

    接口测试 1. 接口的分类:webService和http api接口 1) webService接口:是按照soap协议通过http传输,请求报文和返回报文都是xml格式,一般要借助工具来测试接口: ...

  4. 词频统计 ——Java

    github地址 :https://github.com/NSDie/personal-project 一.计划表 PSP2.1 Personal Software Process Stages 预估 ...

  5. iOS系统知识架构(转)

    转载的,哪些所谓的资深开发,谁敢说自己没有知识盲区?http://ios.skyfox.org/route.html

  6. 随手一写就是一个侧滑关闭activity

    刚忙完一段时间,今天刚清闲会,就把以前写的东西整理整理.于是冥冥中发现有些东西完全可以共享出来,毕竟那么常见,而且简单实用. 实现原因 其实侧滑关闭activity在网上也有大量的文章去介绍他,我也有 ...

  7. 海思arm平台AAC音频转码cpu占用高、效率低的问题解决

    问题背景 目前市面上的大部分IPC摄像机音频输出基本都是G711.G726编码格式,而在类似于<基于EasyNVR实现RTSP/Onvif监控摄像头Web无插件化直播监控>这种业务中,都是 ...

  8. HAWQ + MADlib 玩转数据挖掘之(五)——奇异值分解实现推荐算法

    一.奇异值分解简介 奇异值分解简称SVD(singular value decomposition),可以理解为:将一个比较复杂的矩阵用更小更简单的三个子矩阵的相乘来表示,这三个小矩阵描述了大矩阵重要 ...

  9. go语言学习 strings常用函数

    strings包中的函数用法 参考链接http://studygolang.com/articles/88 1.strings.replace() 函数原型 func Replace(str1, ol ...

  10. ICE:slice语言常识整理

    ICE:Slice语言(二)--源文件和词法规则:    文件命名    Slice的源文件以.ice为扩展名.   对于大小写不区分的系统(例如DOS),文件的扩展名可以大写,也可以小写,例如Cli ...