Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2d8ed7a9
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看板
提交
2d8ed7a9
编写于
5月 19, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: monitor in multi-process mode
上级
fefc2dad
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
40 deletion
+38
-40
source/dnode/mgmt/node_mgmt/src/dmMonitor.c
source/dnode/mgmt/node_mgmt/src/dmMonitor.c
+38
-40
未找到文件。
source/dnode/mgmt/node_mgmt/src/dmMonitor.c
浏览文件 @
2d8ed7a9
...
@@ -57,78 +57,78 @@ static void dmGetDmMonitorInfo(SDnode *pDnode) {
...
@@ -57,78 +57,78 @@ static void dmGetDmMonitorInfo(SDnode *pDnode) {
}
}
static
void
dmGetMmMonitorInfo
(
SDnode
*
pDnode
)
{
static
void
dmGetMmMonitorInfo
(
SDnode
*
pDnode
)
{
SM
onMmInfo
mmInfo
=
{
0
}
;
SM
gmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
MNODE
]
;
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
MNODE
);
if
(
dmMarkWrapper
(
pWrapper
)
==
0
)
{
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
SMonMmInfo
mmInfo
=
{
0
};
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_MM_INFO
,
tDeserializeSMonMmInfo
,
&
mmInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_MM_INFO
,
tDeserializeSMonMmInfo
,
&
mmInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
mmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
mmInfo
);
mmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
mmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetMmInfo
(
&
mmInfo
);
tFreeSMonMmInfo
(
&
mmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetMmInfo
(
&
mmInfo
);
tFreeSMonMmInfo
(
&
mmInfo
);
}
}
static
void
dmGetVmMonitorInfo
(
SDnode
*
pDnode
)
{
static
void
dmGetVmMonitorInfo
(
SDnode
*
pDnode
)
{
SM
onVmInfo
vmInfo
=
{
0
}
;
SM
gmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
VNODE
]
;
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
VNODE
);
if
(
dmMarkWrapper
(
pWrapper
)
==
0
)
{
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
SMonVmInfo
vmInfo
=
{
0
};
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_VM_INFO
,
tDeserializeSMonVmInfo
,
&
vmInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_VM_INFO
,
tDeserializeSMonVmInfo
,
&
vmInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
vmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
vmInfo
);
vmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
vmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetVmInfo
(
&
vmInfo
);
tFreeSMonVmInfo
(
&
vmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetVmInfo
(
&
vmInfo
);
tFreeSMonVmInfo
(
&
vmInfo
);
}
}
static
void
dmGetQmMonitorInfo
(
SDnode
*
pDnode
)
{
static
void
dmGetQmMonitorInfo
(
SDnode
*
pDnode
)
{
SM
onQmInfo
qmInfo
=
{
0
}
;
SM
gmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
QNODE
]
;
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
VNODE
);
if
(
dmMarkWrapper
(
pWrapper
)
==
0
)
{
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
SMonQmInfo
qmInfo
=
{
0
};
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_QM_INFO
,
tDeserializeSMonQmInfo
,
&
qmInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_QM_INFO
,
tDeserializeSMonQmInfo
,
&
qmInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
qmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
qmInfo
);
qmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
qmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetQmInfo
(
&
qmInfo
);
tFreeSMonQmInfo
(
&
qmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetQmInfo
(
&
qmInfo
);
tFreeSMonQmInfo
(
&
qmInfo
);
}
}
static
void
dmGetSmMonitorInfo
(
SDnode
*
pDnode
)
{
static
void
dmGetSmMonitorInfo
(
SDnode
*
pDnode
)
{
SM
onSmInfo
smInfo
=
{
0
}
;
SM
gmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
SNODE
]
;
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
VNODE
);
if
(
dmMarkWrapper
(
pWrapper
)
==
0
)
{
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
SMonSmInfo
smInfo
=
{
0
};
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_SM_INFO
,
tDeserializeSMonSmInfo
,
&
smInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_SM_INFO
,
tDeserializeSMonSmInfo
,
&
smInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
smGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
smInfo
);
smGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
smInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetSmInfo
(
&
smInfo
);
tFreeSMonSmInfo
(
&
smInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetSmInfo
(
&
smInfo
);
tFreeSMonSmInfo
(
&
smInfo
);
}
}
static
void
dmGetBmMonitorInfo
(
SDnode
*
pDnode
)
{
static
void
dmGetBmMonitorInfo
(
SDnode
*
pDnode
)
{
SM
onBmInfo
bmInfo
=
{
0
}
;
SM
gmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
BNODE
]
;
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
VNODE
);
if
(
dmMarkWrapper
(
pWrapper
)
==
0
)
{
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
SMonBmInfo
bmInfo
=
{
0
};
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_BM_INFO
,
tDeserializeSMonBmInfo
,
&
bmInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_BM_INFO
,
tDeserializeSMonBmInfo
,
&
bmInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
bmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
bmInfo
);
bmGetMonitorInfo
(
pWrapper
->
pMgmt
,
&
bmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetBmInfo
(
&
bmInfo
);
tFreeSMonBmInfo
(
&
bmInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
monSetBmInfo
(
&
bmInfo
);
tFreeSMonBmInfo
(
&
bmInfo
);
}
}
void
dmSendMonitorReport
()
{
void
dmSendMonitorReport
()
{
...
@@ -147,26 +147,24 @@ void dmSendMonitorReport() {
...
@@ -147,26 +147,24 @@ void dmSendMonitorReport() {
void
dmGetVnodeLoads
(
SMonVloadInfo
*
pInfo
)
{
void
dmGetVnodeLoads
(
SMonVloadInfo
*
pInfo
)
{
SDnode
*
pDnode
=
dmInstance
();
SDnode
*
pDnode
=
dmInstance
();
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
VNODE
)
;
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
VNODE
]
;
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
if
(
dmMarkWrapper
(
pWrapper
)
==
0
)
{
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_VM_LOAD
,
tDeserializeSMonVloadInfo
,
pInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_VM_LOAD
,
tDeserializeSMonVloadInfo
,
pInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
vmGetVnodeLoads
(
pWrapper
->
pMgmt
,
pInfo
);
vmGetVnodeLoads
(
pWrapper
->
pMgmt
,
pInfo
);
}
}
dmReleaseWrapper
(
pWrapper
);
}
}
dmReleaseWrapper
(
pWrapper
);
}
}
void
dmGetMnodeLoads
(
SMonMloadInfo
*
pInfo
)
{
void
dmGetMnodeLoads
(
SMonMloadInfo
*
pInfo
)
{
SDnode
*
pDnode
=
dmInstance
();
SDnode
*
pDnode
=
dmInstance
();
SMgmtWrapper
*
pWrapper
=
dmAcquireWrapper
(
pDnode
,
MNODE
);
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
MNODE
];
if
(
pWrapper
!=
NULL
&&
pWrapper
->
required
)
{
if
(
tsMultiProcess
)
{
if
(
tsMultiProcess
)
{
dmSendLocalRecv
(
pDnode
,
TDMT_MON_MM_LOAD
,
tDeserializeSMonMloadInfo
,
pInfo
);
dmSendLocalRecv
(
pDnode
,
TDMT_MON_MM_LOAD
,
tDeserializeSMonMloadInfo
,
pInfo
);
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
}
else
if
(
pWrapper
->
pMgmt
!=
NULL
)
{
mmGetMnodeLoads
(
pWrapper
->
pMgmt
,
pInfo
);
mmGetMnodeLoads
(
pWrapper
->
pMgmt
,
pInfo
);
}
}
}
dmReleaseWrapper
(
pWrapper
);
dmReleaseWrapper
(
pWrapper
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录