Browse Source

Handle reweights in mon

trace-sqes
Vitaliy Filippov 2 years ago
parent
commit
fac75b0b57
  1. 3
      lp/mon.js

3
lp/mon.js

@ -271,9 +271,10 @@ class Mon
if (stat.size && (this.state.osd.state[osd_num] || Number(stat.time) >= down_time))
{
// Numeric IDs are reserved for OSDs
const reweight = this.state.config.osd[osd_num] && Number(this.state.config.osd[osd_num].reweight) || 1;
tree[osd_num] = tree[osd_num] || { id: osd_num, parent: stat.host };
tree[osd_num].level = 'osd';
tree[osd_num].size = stat.size / 1024 / 1024 / 1024 / 1024; // terabytes
tree[osd_num].size = reweight * stat.size / 1024 / 1024 / 1024 / 1024; // terabytes
delete tree[osd_num].children;
}
}

Loading…
Cancel
Save