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

TD-1767

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