提交 eb5950b6 编写于 作者: S Shengliang Guan

TD-1767

上级 8517faae
......@@ -301,6 +301,7 @@ bool taosGetDisk() {
struct statvfs info;
const double unit = 1024 * 1024 * 1024;
#if 0
if (tscEmbedded) {
if (statvfs(tsDataDir, &info)) {
//tsTotalDataDirGB = 0;
......@@ -312,6 +313,7 @@ bool taosGetDisk() {
tsAvailDataDirGB = (float)((double)info.f_bavail * (double)info.f_frsize / unit);
}
}
#endif
if (statvfs(tsLogDir, &info)) {
//tsTotalLogDirGB = 0;
......
......@@ -20,6 +20,7 @@
#include "tlog.h"
#include "ttimer.h"
#include "tutil.h"
#include "tdisk.h"
#include "tsystem.h"
#include "tscUtil.h"
#include "tsclient.h"
......@@ -125,6 +126,10 @@ static void *monitorThreadFunc(void *param) {
break;
} else {
taosGetDisk();
tdUpdateTiersInfo(tsDnodeTier);
const double unit = 1024 * 1024 * 1024;
tsTotalDataDirGB = tsDnodeTier->meta.tsize / unit;
tsAvailDataDirGB = tsDnodeTier->meta.avail / unit;
}
if (tsMonitor.start == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册