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 17:16:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df8414af63347fa1f5f50fc2003cad7c9fda5c77
df8414af
1 parent
b3340218
api connections add udp, add disk iops. 0.9.176
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
31 行增加
和
8 行删除
README.md
trunk/src/app/srs_app_utility.cpp
trunk/src/app/srs_app_utility.hpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
df8414a
...
...
@@ -209,6 +209,7 @@ Supported operating systems and hardware:
*
2013-10-17, Created.
<br/>
## History
*
v1.0, 2014-07-27, api connections add udp, add disk iops. 0.9.176
*
v1.0, 2014-07-26, complete config utest. 0.9.173
*
v1.0, 2014-07-26, fix
[
#124
](
https://github.com/winlinvip/simple-rtmp-server/issues/124
)
, gop cache support disable video in publishing. 0.9.171.
*
v1.0, 2014-07-23, fix
[
#121
](
https://github.com/winlinvip/simple-rtmp-server/issues/121
)
, srs_info detail log compile failed. 0.9.168.
...
...
trunk/src/app/srs_app_utility.cpp
查看文件 @
df8414a
...
...
@@ -244,11 +244,6 @@ bool get_proc_system_stat(SrsProcSystemStat& r)
// matched ok.
r
.
ok
=
true
;
// @see: http://tester-higkoo.googlecode.com/svn-history/r14/trunk/Tools/iostat/iostat.c
// add the interrupts to sys.
// TODO: FIXME: check out it.
r
.
sys
+=
r
.
irq
+
r
.
softirq
;
break
;
}
...
...
@@ -362,6 +357,7 @@ SrsDiskStat::SrsDiskStat()
ok
=
false
;
sample_time
=
0
;
in_KBps
=
out_KBps
=
0
;
busy
=
0
;
pgpgin
=
0
;
pgpgout
=
0
;
...
...
@@ -515,6 +511,26 @@ void srs_update_disk_stat()
r
.
out_KBps
=
(
r
.
pgpgout
-
o
.
pgpgout
)
*
1000
/
duration_ms
;
}
}
// diskstats
if
(
true
)
{
SrsProcSystemStat
*
cpu
=
srs_get_system_proc_stat
();
SrsCpuInfo
*
cpuinfo
=
srs_get_cpuinfo
();
if
(
cpu
->
ok
&&
cpu
->
total_delta
>
0
&&
cpuinfo
->
ok
&&
cpuinfo
->
nb_processors
>
0
&&
o
.
ticks
<
r
.
ticks
)
{
// @see: print_partition_stats() of iostat.c
double
delta_ms
=
cpu
->
total_delta
*
10
/
cpuinfo
->
nb_processors
;
unsigned
int
ticks
=
r
.
ticks
-
o
.
ticks
;
// busy in [0, 1], where 0.1532 means 15.32%
r
.
busy
=
srs_min
(
1
,
(
float
)(
ticks
/
delta_ms
));
}
}
_srs_disk_stat
=
r
;
}
SrsMemInfo
::
SrsMemInfo
()
...
...
@@ -1065,8 +1081,9 @@ void srs_api_dump_summaries(std::stringstream& ss)
<<
__SRS_JOBJECT_END
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"system"
,
__SRS_JOBJECT_START
)
<<
__SRS_JFIELD_ORG
(
"cpu_percent"
,
s
->
percent
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"disk_in_KBps"
,
d
->
in_KBps
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"disk_out_KBps"
,
d
->
out_KBps
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"disk_read_KBps"
,
d
->
in_KBps
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"disk_write_KBps"
,
d
->
out_KBps
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"disk_busy_percent"
,
d
->
busy
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"mem_ram_kbyte"
,
m
->
MemTotal
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"mem_ram_percent"
,
m
->
percent_ram
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"mem_swap_kbyte"
,
m
->
SwapTotal
)
<<
__SRS_JFIELD_CONT
...
...
trunk/src/app/srs_app_utility.hpp
查看文件 @
df8414a
...
...
@@ -332,11 +332,16 @@ public:
bool
ok
;
// the time in ms when sample.
int64_t
sample_time
;
// input(read) KBytes per seconds
int
in_KBps
;
// output(write) KBytes per seconds
int
out_KBps
;
// @see: print_partition_stats() of iostat.c
// but its value is [0, 1], for instance, 0.1532 means 15.32%.
float
busy
;
public
:
// @see: cat /proc/vmstat
// the in(read) page count, pgpgin*1024 is the read bytes.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
df8414a
...
...
@@ -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 "17
5
"
#define VERSION_REVISION "17
6
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论