mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine server stat, extract to hybrid server stat
This commit is contained in:
parent
6b260d6021
commit
2aa94c643c
4 changed files with 67 additions and 10 deletions
|
@ -662,11 +662,6 @@ srs_error_t SrsRtcServer::notify(int type, srs_utime_t interval, srs_utime_t tic
|
|||
return err;
|
||||
}
|
||||
|
||||
// Show statistics for RTC server.
|
||||
SrsProcSelfStat* u = srs_get_self_proc_stat();
|
||||
// Resident Set Size: number of pages the process has in real memory.
|
||||
int memory = (int)(u->rss * 4 / 1024);
|
||||
|
||||
// Update the pps stat for UDP socket and adddresses.
|
||||
_srs_pps_pkts->update(); _srs_pps_addrs->update(); _srs_pps_fast_addrs->update();
|
||||
_srs_pps_ids->update(); _srs_pps_fids->update(); _srs_pps_fids_level0->update();
|
||||
|
@ -676,12 +671,11 @@ srs_error_t SrsRtcServer::notify(int type, srs_utime_t interval, srs_utime_t tic
|
|||
_srs_pps_rnack->update(); _srs_pps_rnack2->update();
|
||||
|
||||
// TODO: FIXME: Show more data for RTC server.
|
||||
srs_trace("RTC: Server conns=%u, cpu=%.2f%%, rss=%dMB, pkts=%d, addrs=%d,%d, fid=%d,%d,%d, rtcp=%d,%d,%d, timer=%d,%d,%d, snk=%d,%d,%d,%d, rnk=%d,%d",
|
||||
nn_rtc_conns, u->percent * 100, memory,
|
||||
srs_trace("RTC: Server conns=%u, pkts=%d, addrs=%d,%d, fid=%d,%d,%d, rtcp=%d,%d,%d, snk=%d,%d,%d,%d, rnk=%d,%d",
|
||||
nn_rtc_conns,
|
||||
_srs_pps_pkts->r10s(), _srs_pps_addrs->r10s(), _srs_pps_fast_addrs->r10s(),
|
||||
_srs_pps_ids->r10s(), _srs_pps_fids->r10s(), _srs_pps_fids_level0->r10s(),
|
||||
_srs_pps_pli->r10s(), _srs_pps_twcc->r10s(), _srs_pps_rr->r10s(),
|
||||
_srs_pps_timer->r10s(), _srs_pps_pub->r10s(), _srs_pps_conn->r10s(),
|
||||
_srs_pps_snack->r10s(), _srs_pps_snack2->r10s(), _srs_pps_sanack->r10s(), _srs_pps_svnack->r10s(),
|
||||
_srs_pps_rnack->r10s(), _srs_pps_rnack2->r10s()
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue