From 8318a609029c8648d299b49bcea96eb4958e41d3 Mon Sep 17 00:00:00 2001 From: slguan Date: Tue, 24 Sep 2019 12:36:36 +0800 Subject: [PATCH] fix issue #543 --- src/util/src/tlog.c | 6 +++--- src/util/src/tsystem.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/src/tlog.c b/src/util/src/tlog.c index c4eda4a323..cf359a1de3 100644 --- a/src/util/src/tlog.c +++ b/src/util/src/tlog.c @@ -330,7 +330,7 @@ char *tprefix(char *prefix) { void tprintf(const char *const flags, int dflag, const char *const format, ...) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { - printf("server disk space remain %.3f GB, stop write log\n", tsAvailLogDirGB); + printf("server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", logDir, tsAvailLogDirGB, tsTotalLogDirGB); fflush(stdout); return; } @@ -392,7 +392,7 @@ void tprintf(const char *const flags, int dflag, const char *const format, ...) void taosDumpData(unsigned char *msg, int len) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { - printf("server disk space remain %.3f GB, stop write log\n", tsAvailLogDirGB); + printf("server disk:%s space remain %.3f GB, total %.1f GB, stop dump log.\n", logDir, tsAvailLogDirGB, tsTotalLogDirGB); fflush(stdout); return; } @@ -421,7 +421,7 @@ void taosDumpData(unsigned char *msg, int len) { void taosPrintLongString(const char *const flags, int dflag, const char *const format, ...) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { - printf("server disk space remain %.3f GB, stop write log\n", tsAvailLogDirGB); + printf("server disk:%s space remain %.3f GB, total %.1f GB, stop write log.\n", logDir, tsAvailLogDirGB, tsTotalLogDirGB); fflush(stdout); return; } diff --git a/src/util/src/tsystem.c b/src/util/src/tsystem.c index c0764552d8..0989f007b3 100644 --- a/src/util/src/tsystem.c +++ b/src/util/src/tsystem.c @@ -321,7 +321,7 @@ bool taosGetDisk() { const double unit = 1024 * 1024 * 1024; if (tscEmbedded) { - if (statvfs(tsDirectory, &info)) { + if (statvfs(dataDir, &info)) { tsTotalDataDirGB = 0; tsAvailDataDirGB = 0; return false; -- GitLab