Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-07-27 19:03:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c11001391f73a1c3aca6eae65220a647eef0e82
9c110013
1 parent
6f700f3f
refine log for stats network and disk
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
26 行增加
和
2 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_utility.cpp
trunk/src/app/srs_app_utility.hpp
trunk/src/app/srs_app_config.cpp
查看文件 @
9c11001
...
...
@@ -44,6 +44,7 @@ using namespace std;
#include <srs_core_autofree.hpp>
#include <srs_app_source.hpp>
#include <srs_kernel_file.hpp>
#include <srs_app_utility.hpp>
using
namespace
_srs_internal
;
...
...
@@ -1448,6 +1449,30 @@ int SrsConfig::check_config()
get_stats_network
(),
ret
);
return
ret
;
}
if
(
true
)
{
vector
<
std
::
string
>
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
...
...
trunk/src/app/srs_app_utility.cpp
查看文件 @
9c11001
...
...
@@ -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
);
}
}
...
...
trunk/src/app/srs_app_utility.hpp
查看文件 @
9c11001
...
...
@@ -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
<
std
::
string
>&
srs_get_local_ipv4_ips
();
// get local or peer ip.
...
...
请
注册
或
登录
后发表评论