{"id":16388948,"url":"https://github.com/hongxiaolong/ngx_debug_timer","last_synced_at":"2025-05-05T21:33:49.276Z","repository":{"id":72862812,"uuid":"157850431","full_name":"hongxiaolong/ngx_debug_timer","owner":"hongxiaolong","description":"This module provides access to information of timer usage for nginx/tengine.","archived":false,"fork":false,"pushed_at":"2018-11-16T10:17:41.000Z","size":4,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T12:13:44.522Z","etag":null,"topics":["nginx","tengine"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hongxiaolong.png","metadata":{"files":{"readme":"README.cn","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-16T10:17:05.000Z","updated_at":"2024-01-28T10:02:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe78b225-6ff0-4eff-9c44-97893430061d","html_url":"https://github.com/hongxiaolong/ngx_debug_timer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongxiaolong%2Fngx_debug_timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongxiaolong%2Fngx_debug_timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongxiaolong%2Fngx_debug_timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongxiaolong%2Fngx_debug_timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hongxiaolong","download_url":"https://codeload.github.com/hongxiaolong/ngx_debug_timer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252580015,"owners_count":21771252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nginx","tengine"],"created_at":"2024-10-11T04:30:26.870Z","updated_at":"2025-05-05T21:33:49.257Z","avatar_url":"https://github.com/hongxiaolong.png","language":"C","readme":"ngx_debug_timer\n==============\n\n该模块可以提供NGINX/Tengine定时器的状态信息。\n\n示例\n=======\n\n获取NGINX/Tengine定时器的状态信息\n---------------------------------\n\n```\n http {\n    server {\n        listen 80;\n\n        location = /debug_timer {\n            debug_timer;\n        }\n    }\n }\n```\n\n请求URI /debug_timer，可以获取到该NGINX/Tengine定时器的使用情况统计。\n页面输出如下：\n\n```\n$ curl 'localhost:80/debug_timer'\npid:80490\ntimer:2\n--------- [0] --------\ntimers[i]: 00007F837D02C4B8\n    timer: 148\n       ev: 00007F837D02C488\n     data: 00007F837D02C450\n  handler: 000000010778B450\n   action:\n--------- [1] --------\ntimers[i]: 00007F837D02C698\n    timer: 1263\n       ev: 00007F837D02C668\n     data: 00007F837D02C630\n  handler: 000000010778B450\n   action:\n```\n\n定时器的使用情况统计\n-----------------------------------\n\n数据说明\n====\n\n每个数据段落如\"[0]\"包含当前标号对应定时器的状态信息，数据项意义如下：\n\n* __timers__: 当前定时器地址\n* __timer__: 当前定时器的超时时间\n* __ev__: 当前定时器的关联事件\n* __data__: 当前定时器的关联事件字段\n* __handler__: 当前定时器的关联事件handler，配合addr2line来查询对应函数\n* __action__: 当前定时器的log action\n\nNGINX兼容性\n===================\n\n* 1.13.4 (stable version of 1.13.x) 及其更高版本\n\nTengine兼容性\n=====================\n\n* 2.1.1 (stable version of 2.1.x) 及其更高版本\n\n安装说明\n=======\n\n源码安装，执行如下命令：\n\n```\n$ wget http://nginx.org/download/nginx-1.13.4.tar.gz\n$ tar -xzvf nginx-1.13.4.tar.gz\n$ cd nginx-1.13.4/\n$ ./configure --add-module=/path/to/ngx_debug_timer\n$ make -j4 \u0026\u0026 make install\n```\n\n\n配置指令\n=========\n\n语法: **debug_timer**\n\n默认: `none`\n\n位置: `server, location`\n\nNGINX/Tenigne的定时器状态信息可以通过该location访问得到。\n\n注意信息\n=========\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhongxiaolong%2Fngx_debug_timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhongxiaolong%2Fngx_debug_timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhongxiaolong%2Fngx_debug_timer/lists"}