From dbed7cd307b2418e7a699e2e2901c99627ea752f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Sun, 31 Jan 2021 21:35:04 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20MediaServer=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84HTTP=20API=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MediaServer支持的HTTP-API.md | 37 +++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/MediaServer支持的HTTP-API.md b/MediaServer支持的HTTP-API.md index 675d2a4..4a50408 100644 --- a/MediaServer支持的HTTP-API.md +++ b/MediaServer支持的HTTP-API.md @@ -38,7 +38,8 @@ MediaServer是ZLMediaKit的主进程,目前支持以下http api接口,这些 "/index/api/closeRtpServer", "/index/api/listRtpServer", "/index/api/startSendRtp", - "/index/api/stopSendRtp" + "/index/api/stopSendRtp", + "/index/api/getStatistic" ``` 其中POST方式,参数既可以使用urlencoded方式也可以使用json方式。 @@ -1012,3 +1013,37 @@ typedef enum { "code": 0 #成功 } ``` + +### 29、`/index/api/getStatistic` + + - 功能:获取主要对象个数统计,主要用于分析内存性能 + - 范例:[http://127.0.0.1/index/api/getStatistic?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc](http://127.0.0.1/index/api/getStatistic?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc) + + - 参数: + + | 参数 | 是否必选 | 释意 | + | :----: | :------: | :----------------------------------------------------------: | + | secret | Y | api操作密钥(配置文件配置),如果操作ip是127.0.0.1,则不需要此参数 | + + + - 响应: + + ```json + { + "code": 0, + "data": { + "Buffer": 2, + "BufferLikeString": 1, + "BufferList": 0, + "BufferRaw": 1, + "Frame": 0, + "FrameImp": 0, + "MediaSource": 0, + "MultiMediaSourceMuxer": 0, + "Socket": 66, + "TcpClient": 0, + "TcpServer": 64, + "TcpSession": 1 + } + } + ```