Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0f86e16d
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0f86e16d
编写于
2月 24, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
os
上级
612dd719
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
21 deletion
+24
-21
include/os/osDef.h
include/os/osDef.h
+4
-0
include/os/osSysinfo.h
include/os/osSysinfo.h
+1
-6
source/common/src/tglobal.c
source/common/src/tglobal.c
+19
-0
source/util/src/tlog.c
source/util/src/tlog.c
+0
-15
未找到文件。
include/os/osDef.h
浏览文件 @
0f86e16d
...
...
@@ -191,6 +191,10 @@ extern "C" {
#define TD_DIRSEP "/"
#endif
#define TD_LOCALE_LEN 64
#define TD_CHARSET_LEN 64
#define TD_TIMEZONE_LEN 96
#ifdef __cplusplus
}
#endif
...
...
include/os/osSysinfo.h
浏览文件 @
0f86e16d
...
...
@@ -22,17 +22,13 @@ extern "C" {
#include "os.h"
#define TD_LOCALE_LEN 64
#define TD_CHARSET_LEN 64
#define TD_TIMEZONE_LEN 96
typedef
struct
{
int64_t
total
;
int64_t
used
;
int64_t
avail
;
}
SDiskSize
;
typedef
struct
SDiskSpace
{
typedef
struct
{
int64_t
reserved
;
SDiskSize
size
;
}
SDiskSpace
;
...
...
@@ -48,7 +44,6 @@ void taosGetDisk();
bool
taosGetCpuUsage
(
float
*
sysCpuUsage
,
float
*
procCpuUsage
);
bool
taosGetProcMemory
(
float
*
memoryUsedMB
);
bool
taosGetSysMemory
(
float
*
memoryUsedMB
);
void
taosPrintOsInfo
();
int
taosSystem
(
const
char
*
cmd
);
void
taosKillSystem
();
int32_t
taosGetSystemUUID
(
char
*
uid
,
int32_t
uidlen
);
...
...
source/common/src/tglobal.c
浏览文件 @
0f86e16d
...
...
@@ -263,11 +263,26 @@ static void taosAddClientCfg(SConfig *pCfg) {
cfgAddInt32
(
pCfg
,
"maxNumOfOrderedRes"
,
tsMaxNumOfOrderedResults
,
128
,
TSDB_MAX_ALLOWED_SQL_LEN
,
1
);
cfgAddBool
(
pCfg
,
"keepColumnName"
,
tsKeepOriginalColumnName
,
1
);
cfgAddInt32
(
pCfg
,
"maxBinaryDisplayWidth"
,
tsMaxBinaryDisplayWidth
,
1
,
65536
,
1
);
}
static
void
taosAddSystemInfo
(
SConfig
*
pCfg
)
{
SysNameInfo
info
=
taosGetSysNameInfo
();
cfgAddTimezone
(
pCfg
,
"timezone"
,
tsTimezone
);
cfgAddLocale
(
pCfg
,
"locale"
,
tsLocale
);
cfgAddCharset
(
pCfg
,
"charset"
,
tsCharset
);
cfgAddBool
(
pCfg
,
"enableCoreFile"
,
0
,
1
);
cfgAddInt32
(
pCfg
,
"numOfCores"
,
tsNumOfCores
,
1
,
100000
,
1
);
cfgAddInt32
(
pCfg
,
"pageSize(KB)"
,
tsPageSize
,
0
,
INT64_MAX
,
1
);
cfgAddInt64
(
pCfg
,
"openMax"
,
tsOpenMax
,
0
,
INT64_MAX
,
1
);
cfgAddInt64
(
pCfg
,
"streamMax"
,
tsStreamMax
,
0
,
INT64_MAX
,
1
);
cfgAddInt32
(
pCfg
,
"totalMemory(MB)"
,
tsTotalMemoryMB
,
0
,
INT32_MAX
,
1
);
cfgAddString
(
pCfg
,
"os sysname"
,
info
.
sysname
,
1
);
cfgAddString
(
pCfg
,
"os nodename"
,
info
.
nodename
,
1
);
cfgAddString
(
pCfg
,
"os release"
,
info
.
release
,
1
);
cfgAddString
(
pCfg
,
"os version"
,
info
.
version
,
1
);
cfgAddString
(
pCfg
,
"os machine"
,
info
.
machine
,
1
);
cfgAddString
(
pCfg
,
"os sysname"
,
info
.
sysname
,
1
);
cfgAddString
(
pCfg
,
"version"
,
version
,
1
);
cfgAddString
(
pCfg
,
"compatible_version"
,
compatible_version
,
1
);
...
...
@@ -348,7 +363,9 @@ static void taosSetClientCfg(SConfig *pCfg) {
tsMaxNumOfOrderedResults
=
cfgGetItem
(
pCfg
,
"maxNumOfOrderedRes"
)
->
i32
;
tsKeepOriginalColumnName
=
cfgGetItem
(
pCfg
,
"keepColumnName"
)
->
bval
;
tsMaxBinaryDisplayWidth
=
cfgGetItem
(
pCfg
,
"maxBinaryDisplayWidth"
)
->
i32
;
}
static
void
taosSetSystemCfg
(
SConfig
*
pCfg
)
{
SConfigItem
*
pItem
=
cfgGetItem
(
pCfg
,
"timezone"
);
osSetTimezone
(
pItem
->
str
);
uDebug
(
"timezone format changed from %s to %s"
,
pItem
->
str
,
tsTimezone
);
...
...
@@ -448,6 +465,7 @@ int32_t taosInitCfg(const char *cfgDir, const char *envFile, const char *apolloU
taosAddClientCfg
(
tsCfg
);
taosAddServerCfg
(
tsCfg
);
}
taosAddSystemInfo
(
tsCfg
);
if
(
taosLoadCfg
(
tsCfg
,
cfgDir
,
envFile
,
apolloUrl
)
!=
0
)
{
uError
(
"failed to load cfg since %s"
,
terrstr
());
...
...
@@ -462,6 +480,7 @@ int32_t taosInitCfg(const char *cfgDir, const char *envFile, const char *apolloU
taosSetClientCfg
(
tsCfg
);
taosSetServerCfg
(
tsCfg
);
}
taosSetSystemCfg
(
tsCfg
);
cfgDumpCfg
(
tsCfg
,
tsc
,
false
);
return
0
;
...
...
source/util/src/tlog.c
浏览文件 @
0f86e16d
...
...
@@ -746,21 +746,6 @@ cmp_end:
return
ret
;
}
void
taosPrintOsInfo
()
{
SysNameInfo
info
=
taosGetSysNameInfo
();
uInfo
(
" os pageSize: %"
PRId64
"(KB)"
,
tsPageSize
);
uInfo
(
" os openMax: %"
PRId64
,
tsOpenMax
);
uInfo
(
" os streamMax: %"
PRId64
,
tsStreamMax
);
uInfo
(
" os numOfCores: %d"
,
tsNumOfCores
);
uInfo
(
" os totalMemory: %d(MB)"
,
tsTotalMemoryMB
);
uInfo
(
" os sysname: %s"
,
info
.
sysname
);
uInfo
(
" os nodename: %s"
,
info
.
nodename
);
uInfo
(
" os release: %s"
,
info
.
release
);
uInfo
(
" os version: %s"
,
info
.
version
);
uInfo
(
" os machine: %s"
,
info
.
machine
);
}
void
taosSetAllDebugFlag
(
int32_t
flag
)
{
if
(
!
(
flag
&
DEBUG_TRACE
||
flag
&
DEBUG_DEBUG
||
flag
&
DEBUG_DUMP
))
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录