未验证 提交 8715de7f 编写于 作者: weixin_48148422's avatar weixin_48148422 提交者: GitHub

Merge pull request #755 from taosdata/feature/lihui

[TBASE-1123]
......@@ -586,9 +586,13 @@ void taosKillSystem() {
kill(tsProcId, 2);
}
extern int tsEnableCoreFile;
int _sysctl(struct __sysctl_args *args );
void taosSetCoreDump() {
if (0 == tsEnableCoreFile) {
return;
}
// 1. set ulimit -c unlimited
struct rlimit rlim;
struct rlimit rlim_new;
......
......@@ -163,6 +163,7 @@ int tsTelegrafUseFieldNum = 0;
int tsAdminRowLimit = 10240;
int tsTscEnableRecordSql = 0;
int tsEnableCoreFile = 0;
int tsRpcTimer = 300;
int tsRpcMaxTime = 600; // seconds;
......@@ -772,6 +773,11 @@ static void doInitGlobalConfig() {
tsInitConfigOption(cfg++, "tscEnableRecordSql", &tsTscEnableRecordSql, TSDB_CFG_VTYPE_INT,
TSDB_CFG_CTYPE_B_CONFIG,
1, 100000, 0, TSDB_CFG_UTYPE_NONE);
tsInitConfigOption(cfg++, "enableCoreFile", &tsEnableCoreFile, TSDB_CFG_VTYPE_INT,
TSDB_CFG_CTYPE_B_CONFIG,
1, 100000, 0, TSDB_CFG_UTYPE_NONE);
// version info
tsInitConfigOption(cfg++, "gitinfo", gitinfo, TSDB_CFG_VTYPE_STRING,
TSDB_CFG_CTYPE_B_SHOW | TSDB_CFG_CTYPE_B_CLIENT,
......@@ -784,6 +790,7 @@ static void doInitGlobalConfig() {
0, 0, 0, TSDB_CFG_UTYPE_NONE);
tsGlobalConfigNum = (int)(cfg - tsGlobalConfig);
assert(tsGlobalConfigNum <= TSDB_CFG_MAX_NUM);
}
static pthread_once_t initGlobalConfig = PTHREAD_ONCE_INIT;
......@@ -1161,4 +1168,4 @@ void tsPrintGlobalConfigSpec() {
pPrint(" dataDir: %s", dataDir);
}
#endif
\ No newline at end of file
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册