failed to get bandwidth
This commit is contained in:
parent
b50d04efe4
commit
b8c6d6c031
|
@ -27,39 +27,19 @@ extern int32_t mdebugFlag;
|
|||
extern int32_t sdbDebugFlag;
|
||||
|
||||
// mnode log function
|
||||
#define mError(...) \
|
||||
if (mdebugFlag & DEBUG_ERROR) { \
|
||||
taosPrintLog("ERROR MND ", 255, __VA_ARGS__); \
|
||||
}
|
||||
#define mWarn(...) \
|
||||
if (mdebugFlag & DEBUG_WARN) { \
|
||||
taosPrintLog("WARN MND ", mdebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define mTrace(...) \
|
||||
if (mdebugFlag & DEBUG_TRACE) { \
|
||||
taosPrintLog("MND ", mdebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define mPrint(...) \
|
||||
{ taosPrintLog("MND ", 255, __VA_ARGS__); }
|
||||
#define mError(...) if (mdebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND ", 255, __VA_ARGS__); }
|
||||
#define mWarn(...) if (mdebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND ", mdebugFlag, __VA_ARGS__); }
|
||||
#define mTrace(...) if (mdebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mdebugFlag, __VA_ARGS__); }
|
||||
#define mPrint(...) { taosPrintLog("MND ", 255, __VA_ARGS__); }
|
||||
|
||||
#define mLError(...) monitorSaveLog(2, __VA_ARGS__); mError(__VA_ARGS__)
|
||||
#define mLWarn(...) monitorSaveLog(1, __VA_ARGS__); mWarn(__VA_ARGS__)
|
||||
#define mLPrint(...) monitorSaveLog(0, __VA_ARGS__); mPrint(__VA_ARGS__)
|
||||
|
||||
#define sdbError(...) \
|
||||
if (sdbDebugFlag & DEBUG_ERROR) { \
|
||||
taosPrintLog("ERROR MND-SDB ", 255, __VA_ARGS__); \
|
||||
}
|
||||
#define sdbWarn(...) \
|
||||
if (sdbDebugFlag & DEBUG_WARN) { \
|
||||
taosPrintLog("WARN MND-SDB ", sdbDebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define sdbTrace(...) \
|
||||
if (sdbDebugFlag & DEBUG_TRACE) { \
|
||||
taosPrintLog("MND-SDB ", sdbDebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define sdbPrint(...) \
|
||||
{ taosPrintLog("MND-SDB ", 255, __VA_ARGS__); }
|
||||
#define sdbError(...) if (sdbDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND-SDB ", 255, __VA_ARGS__); }
|
||||
#define sdbWarn(...) if (sdbDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND-SDB ", sdbDebugFlag, __VA_ARGS__); }
|
||||
#define sdbTrace(...) if (sdbDebugFlag & DEBUG_TRACE) { taosPrintLog("MND-SDB ", sdbDebugFlag, __VA_ARGS__);}
|
||||
#define sdbPrint(...) { taosPrintLog("MND-SDB ", 255, __VA_ARGS__); }
|
||||
|
||||
#define sdbLError(...) monitorSaveLog(2, __VA_ARGS__); sdbError(__VA_ARGS__)
|
||||
#define sdbLWarn(...) monitorSaveLog(1, __VA_ARGS__); sdbWarn(__VA_ARGS__)
|
|
@ -20,7 +20,7 @@
|
|||
#include "tutil.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtDb.h"
|
||||
#include "mgmtSdb.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "tbalance.h"
|
||||
#include "tglobal.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtMnode.h"
|
||||
#include "mgmtDnode.h"
|
||||
#include "mgmtVgroup.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "tbalance.h"
|
||||
#include "tdataformat.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtDb.h"
|
||||
#include "mgmtDnode.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "tdataformat.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtDnode.h"
|
||||
#include "mgmtMnode.h"
|
||||
#include "mgmtSdb.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "os.h"
|
||||
#include "taoserror.h"
|
||||
#include "tgrant.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
|
||||
int32_t grantInit() { return TSDB_CODE_SUCCESS; }
|
||||
void grantCleanUp() {}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "tglobal.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtServer.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtDnode.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "tsocket.h"
|
||||
#include "tdataformat.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtMnode.h"
|
||||
#include "mgmtDnode.h"
|
||||
#include "mgmtSdb.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "taoserror.h"
|
||||
#include "tutil.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtDnode.h"
|
||||
#include "mgmtDb.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "hashstr.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtMnode.h"
|
||||
#include "mgmtSdb.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "tglobal.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtDb.h"
|
||||
#include "mgmtMnode.h"
|
||||
#include "mgmtProfile.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "tcache.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtDb.h"
|
||||
#include "mgmtDnode.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "tglobal.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtDb.h"
|
||||
#include "mgmtDnode.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "tdataformat.h"
|
||||
#include "dnode.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtAcct.h"
|
||||
#include "mgmtMnode.h"
|
||||
#include "mgmtSdb.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "dnode.h"
|
||||
#include "tdataformat.h"
|
||||
#include "mgmtDef.h"
|
||||
#include "mgmtLog.h"
|
||||
#include "mgmtInt.h"
|
||||
#include "mgmtDb.h"
|
||||
#include "mgmtDnode.h"
|
||||
#include "mgmtMnode.h"
|
||||
|
|
|
@ -356,10 +356,15 @@ static bool taosGetCardName(char *ip, char *name) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (strcmp(host, ip) == 0) {
|
||||
strcpy(name, ifa->ifa_name);
|
||||
ret = true;
|
||||
if (strcmp(host, "127.0.0.1") == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO: the ip not config
|
||||
// if (strcmp(host, ip) == 0) {
|
||||
strcpy(name, ifa->ifa_name);
|
||||
ret = true;
|
||||
// }
|
||||
}
|
||||
|
||||
freeifaddrs(ifaddr);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
{ taosPrintLog("MON ", 255, __VA_ARGS__); }
|
||||
|
||||
#define SQL_LENGTH 1024
|
||||
#define LOG_LEN_STR 80
|
||||
#define LOG_LEN_STR 100
|
||||
#define IP_LEN_STR 18
|
||||
#define CHECK_INTERVAL 1000
|
||||
|
||||
|
@ -148,8 +148,8 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) {
|
|||
|
||||
if (cmd == MONITOR_CMD_CREATE_DB) {
|
||||
snprintf(sql, SQL_LENGTH,
|
||||
"create database if not exists %s replica 1 days 10 keep 30 cache 2 "
|
||||
"blocks 2 maxtables 32 precision 'us'",
|
||||
"create database if not exists %s replica 1 days 10 keep 30 cache 1 "
|
||||
"blocks 2 maxtables 16 precision 'us'",
|
||||
tsMonitorDbName);
|
||||
} else if (cmd == MONITOR_CMD_CREATE_MT_DN) {
|
||||
snprintf(sql, SQL_LENGTH,
|
||||
|
@ -407,7 +407,7 @@ void monitorSaveLog(int32_t level, const char *const format, ...) {
|
|||
|
||||
if (tsMonitorConn.state != MONITOR_STATE_INITIALIZED) return;
|
||||
|
||||
int32_t len = snprintf(sql, (size_t)max_length, "import into %s.log values(%" PRId64 ", %d,'", tsMonitorDbName,
|
||||
int32_t len = snprintf(sql, (size_t)max_length, "insert into %s.log values(%" PRId64 ", %d,'", tsMonitorDbName,
|
||||
taosGetTimestampUs(), level);
|
||||
|
||||
va_start(argpointer, format);
|
||||
|
|
Loading…
Reference in New Issue