From d5f03200a7b33766ff2b994e35bd29115a3a1896 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 1 Aug 2014 23:08:52 +0800 Subject: [PATCH] revert tcp stat. need more refine. 0.9.182 --- trunk/src/app/srs_app_server.cpp | 2 +- trunk/src/app/srs_app_utility.cpp | 10 +--------- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp index 3489a2363..43841265a 100644 --- a/trunk/src/app/srs_app_server.cpp +++ b/trunk/src/app/srs_app_server.cpp @@ -90,7 +90,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // update network devices info interval: // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES -#define SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES 120 +#define SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES 90 SrsListener::SrsListener(SrsServer* server, SrsListenerType type) { diff --git a/trunk/src/app/srs_app_utility.cpp b/trunk/src/app/srs_app_utility.cpp index 826adc20c..1b4363b2a 100644 --- a/trunk/src/app/srs_app_utility.cpp +++ b/trunk/src/app/srs_app_utility.cpp @@ -833,18 +833,10 @@ void srs_update_rtmp_server(int nb_conn, SrsKbps* kbps) int nb_conn_sys_other = 0; // @see: http://tester-higkoo.googlecode.com/svn-history/r14/trunk/Tools/iostat/iostat.c - for (int i = 0; fgets(buf, sizeof(buf), f); i++) { + while (fgets(buf, sizeof(buf), f)) { int st = 0; int ret = sscanf(buf, "%*s %*s %*s %2x\n", &st); - // there are maybe many many connections, - // for example, when srs used for monitor other process, - // like nginx, there are maybe many TIME_WAIT conections. - // we sleep 10ms when read 1000 records, so 1000ms for 10w connections. - if ((i % 1000) == 0) { - st_usleep(10 * 1000); - } - if (ret == 1) { if (st == SYS_TCP_ESTABLISHED) { nb_conn_sys_established++; diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 635a950d5..28a7711f6 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR "0" #define VERSION_MINOR "9" -#define VERSION_REVISION "181" +#define VERSION_REVISION "182" #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION // server info. #define RTMP_SIG_SRS_KEY "SRS"