This commit is contained in:
Shengliang Guan 2020-10-22 10:31:09 +00:00
parent 8517faaefa
commit eb5950b6d6
2 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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) {