diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 4a8fee28eb2..f634247f8cb 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -37,7 +37,7 @@ void common_init(std::vector& args, const char *module_type, bool i sprintf(val, "%i", g_conf.profiler_allocation_interval); setenv("HEAP_PROFILE_ALLOCATION_INTERVAL", val, g_conf.profiler_allocation_interval); sprintf(val, "%i", g_conf.profiler_highwater_interval); - setenv("HEAP_PROFILE_INUSE_INTERVAL", "", g_conf.profiler_highwater_interval); + setenv("HEAP_PROFILE_INUSE_INTERVAL", val, g_conf.profiler_highwater_interval); generic_dout(0) << "turning on heap profiler with prefix " << profile_name << dendl; g_conf.profiler_start(profile_name); delete profile_name; diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index a3d5bcb081b..2c6cde34cda 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -754,7 +754,7 @@ void MDS::handle_command(MMonCommand *m) sprintf(val, "%i", g_conf.profiler_allocation_interval); setenv("HEAP_PROFILE_ALLOCATION_INTERVAL", val, g_conf.profiler_allocation_interval); sprintf(val, "%i", g_conf.profiler_highwater_interval); - setenv("HEAP_PROFILE_INUSE_INTERVAL", "", g_conf.profiler_highwater_interval); + setenv("HEAP_PROFILE_INUSE_INTERVAL", val, g_conf.profiler_highwater_interval); stringstream ss; ss << g_conf.name << " set heap variables from current config"; logclient.log(LOG_INFO, ss); diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 52cdab959df..122931af14c 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1836,7 +1836,7 @@ void OSD::handle_command(MMonCommand *m) sprintf(val, "%i", g_conf.profiler_allocation_interval); setenv("HEAP_PROFILE_ALLOCATION_INTERVAL", val, g_conf.profiler_allocation_interval); sprintf(val, "%i", g_conf.profiler_highwater_interval); - setenv("HEAP_PROFILE_INUSE_INTERVAL", "", g_conf.profiler_highwater_interval); + setenv("HEAP_PROFILE_INUSE_INTERVAL", val, g_conf.profiler_highwater_interval); stringstream ss; ss << g_conf.name << " set heap variables from current config"; logclient.log(LOG_INFO, ss);