mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
rename network_device_index to network
This commit is contained in:
parent
f4ea48adcb
commit
6f700f3f40
3 changed files with 6 additions and 6 deletions
|
@ -90,7 +90,7 @@ stats {
|
||||||
network 0;
|
network 0;
|
||||||
# the device name to stat the disk iops.
|
# the device name to stat the disk iops.
|
||||||
# ignore the device of /proc/diskstats if not configed.
|
# ignore the device of /proc/diskstats if not configed.
|
||||||
disk_device_name sda sdb xvda xvdb;
|
disk sda sdb xvda xvdb;
|
||||||
}
|
}
|
||||||
|
|
||||||
#############################################################################################
|
#############################################################################################
|
||||||
|
|
|
@ -1249,7 +1249,7 @@ int SrsConfig::check_config()
|
||||||
SrsConfDirective* conf = get_stats();
|
SrsConfDirective* conf = get_stats();
|
||||||
for (int i = 0; conf && i < (int)conf->directives.size(); i++) {
|
for (int i = 0; conf && i < (int)conf->directives.size(); i++) {
|
||||||
string n = conf->at(i)->name;
|
string n = conf->at(i)->name;
|
||||||
if (n != "network" && n != "disk_device_name") {
|
if (n != "network" && n != "disk") {
|
||||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||||
srs_error("unsupported stats directive %s, ret=%d", n.c_str(), ret);
|
srs_error("unsupported stats directive %s, ret=%d", n.c_str(), ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -3202,7 +3202,7 @@ SrsConfDirective* SrsConfig::get_stats_disk_device()
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf = conf->get("disk_device_name");
|
conf = conf->get("disk");
|
||||||
if (!conf || conf->args.size() == 0) {
|
if (!conf || conf->args.size() == 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ std::string __full_conf = ""
|
||||||
" network 0; \n"
|
" network 0; \n"
|
||||||
" # the device name to stat the disk iops. \n"
|
" # the device name to stat the disk iops. \n"
|
||||||
" # ignore the device of /proc/diskstats if not configed. \n"
|
" # ignore the device of /proc/diskstats if not configed. \n"
|
||||||
" disk_device_name sda sdb xvda xvdb; \n"
|
" disk sda sdb xvda xvdb; \n"
|
||||||
"} \n"
|
"} \n"
|
||||||
" \n"
|
" \n"
|
||||||
"############################################################################################# \n"
|
"############################################################################################# \n"
|
||||||
|
@ -4642,12 +4642,12 @@ VOID TEST(ConfigMainTest, CheckConf_stats)
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
MockSrsConfig conf;
|
MockSrsConfig conf;
|
||||||
EXPECT_TRUE(ERROR_SUCCESS == conf.parse(_MIN_OK_CONF"stats{disk_device_name sda;}"));
|
EXPECT_TRUE(ERROR_SUCCESS == conf.parse(_MIN_OK_CONF"stats{disk sda;}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
MockSrsConfig conf;
|
MockSrsConfig conf;
|
||||||
EXPECT_TRUE(ERROR_SUCCESS != conf.parse(_MIN_OK_CONF"stats{disk_device_names sda;}"));
|
EXPECT_TRUE(ERROR_SUCCESS != conf.parse(_MIN_OK_CONF"stats{disks sda;}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue