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-06-18 16:21:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0e4dc80856be784729610ca290176b8fdf1b3a9
b0e4dc80
1 parent
d0b08d0d
refine network bytes of summaries, remove the lo data.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
11 行增加
和
5 行删除
trunk/src/app/srs_app_http_api.cpp
trunk/src/app/srs_app_utility.cpp
trunk/src/app/srs_app_http_api.cpp
查看文件 @
b0e4dc8
...
...
@@ -406,12 +406,17 @@ int SrsApiSummaries::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
int
nb_n
=
srs_get_network_devices_count
();
for
(
int
i
=
0
;
i
<
nb_n
;
i
++
)
{
SrsNetworkDevices
&
o
=
n
[
i
];
if
(
o
.
ok
)
{
n_ok
=
true
;
nr_bytes
+=
o
.
rbytes
;
ns_bytes
+=
o
.
sbytes
;
n_sample_time
=
o
.
sample_time
;
// ignore the lo interface.
std
::
string
inter
=
o
.
name
;
if
(
!
o
.
ok
||
inter
==
"lo"
)
{
continue
;
}
n_ok
=
true
;
nr_bytes
+=
o
.
rbytes
;
ns_bytes
+=
o
.
sbytes
;
n_sample_time
=
o
.
sample_time
;
}
ss
<<
JOBJECT_START
...
...
trunk/src/app/srs_app_utility.cpp
查看文件 @
b0e4dc8
...
...
@@ -509,6 +509,7 @@ void srs_update_network_devices()
if
(
ret
==
17
)
{
r
.
ok
=
true
;
r
.
name
[
sizeof
(
r
.
name
)
-
1
]
=
0
;
_nb_srs_system_network_devices
=
i
+
1
;
r
.
sample_time
=
srs_get_system_time_ms
();
}
...
...
请
注册
或
登录
后发表评论