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 + } + } + ```