mds/MDBalancer: add err info when ifstream open failure

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
This commit is contained in:
huanwen ren 2016-07-28 16:05:00 +08:00
parent 12c068365c
commit 5478769753

View File

@ -162,7 +162,9 @@ mds_load_t MDBalancer::get_load(utime_t now)
ifstream cpu("/proc/loadavg");
if (cpu.is_open())
cpu >> load.cpu_load_avg;
else
derr << "input file '/proc/loadavg' not found" << dendl;
dout(15) << "get_load " << load << dendl;
return load;
}