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