mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add srs bytes and kbps to api summaries. 0.9.126
This commit is contained in:
parent
8fabd5d987
commit
6ee2ba049b
17 changed files with 325 additions and 36 deletions
|
@ -35,6 +35,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <sys/resource.h>
|
||||
|
||||
class SrsKbps;
|
||||
|
||||
/**
|
||||
* convert level in string to log level in int.
|
||||
* @return the log level defined in SrsLogLevel.
|
||||
|
@ -390,6 +392,36 @@ extern int srs_get_network_devices_count();
|
|||
// the deamon st-thread will update it.
|
||||
extern void srs_update_network_devices();
|
||||
|
||||
// srs rtmp network summary
|
||||
class SrsNetworkRtmpServer
|
||||
{
|
||||
public:
|
||||
// whether the network device is ok.
|
||||
bool ok;
|
||||
|
||||
// the sample time in ms.
|
||||
int64_t sample_time;
|
||||
|
||||
// data for receive.
|
||||
int64_t rbytes;
|
||||
int rkbps;
|
||||
int rkbps_30s;
|
||||
int rkbps_5m;
|
||||
|
||||
// data for transmit
|
||||
int64_t sbytes;
|
||||
int skbps;
|
||||
int skbps_30s;
|
||||
int skbps_5m;
|
||||
|
||||
SrsNetworkRtmpServer();
|
||||
};
|
||||
|
||||
// get network devices info, use cache to avoid performance problem.
|
||||
extern SrsNetworkRtmpServer* srs_get_network_rtmp_server();
|
||||
// the deamon st-thread will update it.
|
||||
extern void srs_update_rtmp_server(SrsKbps* kbps);
|
||||
|
||||
// get local ip, fill to @param ips
|
||||
extern void srs_retrieve_local_ipv4_ips();
|
||||
extern std::vector<std::string>& srs_get_local_ipv4_ips();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue