TD-1767
This commit is contained in:
parent
8517faaefa
commit
eb5950b6d6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue