diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 41ce7dfe4..9f9236b59 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -44,6 +44,7 @@ using namespace std; #include #include #include +#include using namespace _srs_internal; @@ -1448,6 +1449,30 @@ int SrsConfig::check_config() get_stats_network(), ret); return ret; } + if (true) { + vector ips = srs_get_local_ipv4_ips(); + int index = get_stats_network(); + if (index >= (int)ips.size()) { + ret = ERROR_SYSTEM_CONFIG_INVALID; + srs_error("stats network invalid, total local ip count=%d, index=%d, ret=%d", + (int)ips.size(), index, ret); + return ret; + } + srs_warn("stats network use index=%d, ip=%s", index, ips.at(index).c_str()); + } + if (true) { + SrsConfDirective* conf = get_stats_disk_device(); + if (conf == NULL || (int)conf->args.size() <= 0) { + srs_warn("stats disk not configed, disk iops disabled."); + } else { + string disks; + for (int i = 0; i < (int)conf->args.size(); i++) { + disks += conf->args.at(i); + disks += " "; + } + srs_warn("stats disk list: %s", disks.c_str()); + } + } //////////////////////////////////////////////////////////////////////// // check http api diff --git a/trunk/src/app/srs_app_utility.cpp b/trunk/src/app/srs_app_utility.cpp index 67392f7f3..d5bdec890 100644 --- a/trunk/src/app/srs_app_utility.cpp +++ b/trunk/src/app/srs_app_utility.cpp @@ -943,7 +943,7 @@ void retrieve_local_ipv4_ips() std::string ip = buf; if (ip != SRS_CONSTS_LOCALHOST) { - srs_trace("retrieve local ipv4 addresses: %s", ip.c_str()); + srs_trace("retrieve local ipv4 ip=%s, index=%d", ip.c_str(), (int)ips.size()); ips.push_back(ip); } } diff --git a/trunk/src/app/srs_app_utility.hpp b/trunk/src/app/srs_app_utility.hpp index 26b26b348..698995a76 100644 --- a/trunk/src/app/srs_app_utility.hpp +++ b/trunk/src/app/srs_app_utility.hpp @@ -610,7 +610,6 @@ extern SrsNetworkRtmpServer* srs_get_network_rtmp_server(); extern void srs_update_rtmp_server(int nb_conn, SrsKbps* kbps); // get local ip, fill to @param ips -extern void srs_retrieve_local_ipv4_ips(); extern std::vector& srs_get_local_ipv4_ips(); // get local or peer ip.