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. 项目提交到github的忽略文件

    1.在工作区的.gitignore文件中配置如下: # Built application files*.apk*.ap_ # Files for the Dalvik VM*.dex # Java ...

  2. Idea_02_常用配置

    一.前言 在上一节,我们安装并激活了IDEA,这一节我们来设置下Idea的常用配置: 项目相关配置 Idea常用配置 二.项目相关配置 运行Idea,出现下图 1.配置默认JDK 1.1 添加 SDK ...

  3. 不能在具有唯一索引“IX_******”的对象“dbo.****”中插入重复键的行。重复键值为 (110, 372000, 2)。

    当尝试插入数据,或者更新某个表的时候出现 不能在具有唯一索引“IX_******”的对象“dbo.****”中插入重复键的行.重复键值为 (110, 372000, 2). 遇到这个问题的时候,请找到 ...

  4. idea 配置springmvc+mybatis(图文教程)

    idea配置 spirngmvc+maven+mybatis 数据库采用的是mysql  服务器容器用的是tomcat8 废话不多说直接干! 首先新建一个 maven工程, "File&qu ...

  5. Spring警告: Could not load driverClass com.mysql.jdbc.Driver(待解决)

    在一个Spring项目中,新建了一个外部属性文件db.properties,在xml文件中利用${}来引用db.properties文件里面的属性. beans-properties.xml: < ...

  6. 天气预报api整理

    目录 1.国家气象局提供的天气预报接口 1.1.接口网址 1.2.示范代码 2.各个城市对应的代码 作为一个开发的diaosi,在开发过程中,时常会遇到添加天气的功能,现在百忙之中抽出一点时间整理了一 ...

  7. 《Drools7.0.0.Final规则引擎教程》第4章 4.3 日历

    日历 日历可以单独应用于规则中,也可以和timer结合使用在规则中使用.通过属性calendars来定义日历.如果是多个日历,则不同日历之间用逗号进行分割. 在Drools中,日历的概念只是将日历属性 ...

  8. Ethernet、VLAN、QinQ

    以太网帧格式: 各字段解释: DMAC:目的MAC地址,该字段确定帧的接收者. SMAC:源MAC地址,该字段标识发送帧的工作站. Type:上层协议类型(0x0800:IP;0x0808:ARP;0 ...

  9. OK335x mksd.sh hacking

    #! /bin/sh # mk3PartSDCard. # Licensed under terms of GPLv2 # 参考文档: # . sfidsk创建可启动分区问题 # http://seg ...

  10. Eclipse远程调试Java程序

    1. 在服务器上运行jar包时加入参数 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 2. 在Eclipse中操作 ...