Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
634d8968
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
634d8968
编写于
8月 03, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
8月 03, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2886 from taosdata/feature/td-1033
TD-1033: enable telemetry reporting by default
上级
a63daaf7
ca9c0ad2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
8 deletion
+13
-8
src/common/src/tglobal.c
src/common/src/tglobal.c
+1
-1
src/dnode/src/dnodeTelemetry.c
src/dnode/src/dnodeTelemetry.c
+5
-5
src/os/src/detail/osSysinfo.c
src/os/src/detail/osSysinfo.c
+5
-1
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+1
-0
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+1
-1
未找到文件。
src/common/src/tglobal.c
浏览文件 @
634d8968
...
...
@@ -40,7 +40,7 @@ uint16_t tsSyncPort = 6040;
int32_t
tsStatusInterval
=
1
;
// second
int32_t
tsNumOfMnodes
=
3
;
int32_t
tsEnableVnodeBak
=
1
;
int32_t
tsEnableTelemetryReporting
=
0
;
int32_t
tsEnableTelemetryReporting
=
1
;
// common
int32_t
tsRpcTimer
=
1000
;
...
...
src/dnode/src/dnodeTelemetry.c
浏览文件 @
634d8968
...
...
@@ -174,7 +174,6 @@ static void addVersionInfo(SBufferWriter* bw) {
}
static
void
addRuntimeInfo
(
SBufferWriter
*
bw
)
{
addStringField
(
bw
,
"clusterId"
,
mnodeGetClusterId
());
// addIntField(&bw, "numOfDnode", 1);
// addIntField(&bw, "numOfVnode", 1);
// addIntField(&bw, "numOfStable", 1);
...
...
@@ -189,17 +188,18 @@ static void sendTelemetryReport() {
char
buf
[
128
];
uint32_t
ip
=
taosGetIpFromFqdn
(
TELEMETRY_SERVER
);
if
(
ip
==
0xffffffff
)
{
d
Error
(
"failed to get IP address of "
TELEMETRY_SERVER
", reason:%s"
,
strerror
(
errno
));
d
Trace
(
"failed to get IP address of "
TELEMETRY_SERVER
", reason:%s"
,
strerror
(
errno
));
return
;
}
int
fd
=
taosOpenTcpClientSocket
(
ip
,
TELEMETRY_PORT
,
0
);
if
(
fd
<
0
)
{
d
Error
(
"failed to create socket for telemetry, reason:%s"
,
strerror
(
errno
));
d
Trace
(
"failed to create socket for telemetry, reason:%s"
,
strerror
(
errno
));
return
;
}
SBufferWriter
bw
=
tbufInitWriter
(
NULL
,
false
);
beginObject
(
&
bw
);
addStringField
(
&
bw
,
"instanceId"
,
mnodeGetClusterId
());
addIntField
(
&
bw
,
"reportVersion"
,
1
);
addOsInfo
(
&
bw
);
addCpuInfo
(
&
bw
);
...
...
@@ -254,7 +254,7 @@ int32_t dnodeInitTelemetry() {
if
(
sem_init
(
&
tsExitSem
,
0
,
0
)
==
-
1
)
{
// just log the error, it is ok for telemetry to fail
d
Error
(
"failed to create semaphore for telemetry, reason:%s"
,
strerror
(
errno
));
d
Trace
(
"failed to create semaphore for telemetry, reason:%s"
,
strerror
(
errno
));
return
0
;
}
...
...
@@ -265,7 +265,7 @@ int32_t dnodeInitTelemetry() {
int32_t
code
=
pthread_create
(
&
tsTelemetryThread
,
&
attr
,
telemetryThread
,
NULL
);
pthread_attr_destroy
(
&
attr
);
if
(
code
!=
0
)
{
d
Error
(
"failed to create telemetry thread, reason:%s"
,
strerror
(
errno
));
d
Trace
(
"failed to create telemetry thread, reason:%s"
,
strerror
(
errno
));
}
return
0
;
...
...
src/os/src/detail/osSysinfo.c
浏览文件 @
634d8968
...
...
@@ -651,7 +651,11 @@ bool taosGetSystemUid(char *uid) {
close
(
fd
);
}
return
len
>
0
;
if
(
len
>=
36
)
{
uid
[
36
]
=
0
;
return
true
;
}
return
false
;
}
#endif
\ No newline at end of file
tests/pytest/util/dnodes.py
浏览文件 @
634d8968
...
...
@@ -39,6 +39,7 @@ class TDSimClient:
"udebugFlag"
:
"135"
,
"jnidebugFlag"
:
"135"
,
"qdebugFlag"
:
"135"
,
"telemetryReporting"
:
"0"
,
}
def
init
(
self
,
path
):
self
.
__init__
()
...
...
tests/script/sh/deploy.sh
浏览文件 @
634d8968
...
...
@@ -147,6 +147,6 @@ echo "asyncLog 0" >> $TAOS_CFG
echo
"numOfMnodes 1"
>>
$TAOS_CFG
echo
"locale en_US.UTF-8"
>>
$TAOS_CFG
echo
"fsync 0"
>>
$TAOS_CFG
echo
"t
sEnableTelemetryReporting 0"
>>
$TAOS_CFG
echo
"t
elemetryReporting 0"
>>
$TAOS_CFG
echo
" "
>>
$TAOS_CFG
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录