Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
39ce5f8a
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
39ce5f8a
编写于
11月 11, 2021
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merge branch 'develop' into feature/TD-6452
上级
0aaa4500
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
17 deletion
+26
-17
src/os/src/windows/wSysinfo.c
src/os/src/windows/wSysinfo.c
+26
-17
未找到文件。
src/os/src/windows/wSysinfo.c
浏览文件 @
39ce5f8a
...
...
@@ -185,30 +185,39 @@ bool taosReadProcIO(int64_t *rchars, int64_t *wchars, int64_t *rbytes, int64_t *
return
false
;
}
bool
taosGetProcIO
(
float
*
r
eadKB
,
float
*
wri
teKB
)
{
static
int64_t
lastR
ead
byte
=
-
1
;
static
int64_t
lastW
rite
byte
=
-
1
;
bool
taosGetProcIO
(
float
*
r
charKB
,
float
*
wcharKB
,
float
*
rbyteKB
,
float
*
wby
teKB
)
{
static
int64_t
lastR
char
=
-
1
,
lastR
byte
=
-
1
;
static
int64_t
lastW
char
=
-
1
,
lastW
byte
=
-
1
;
int64_t
curR
ead
byte
=
0
;
int64_t
curW
rite
byte
=
0
;
int64_t
curR
char
=
0
,
curR
byte
=
0
;
int64_t
curW
char
=
0
,
curW
byte
=
0
;
if
(
!
taosReadProcIO
(
&
curR
eadbyte
,
&
curWritebyte
,
NULL
,
NULL
))
{
if
(
!
taosReadProcIO
(
&
curR
char
,
&
curWchar
,
&
curRbyte
,
&
curWbyte
))
{
return
false
;
}
if
(
lastReadbyte
==
-
1
||
lastWritebyte
==
-
1
)
{
lastReadbyte
=
curReadbyte
;
lastWritebyte
=
curWritebyte
;
if
(
lastRchar
==
-
1
||
lastWchar
==
-
1
||
lastRbyte
==
-
1
||
lastWbyte
==
-
1
)
{
lastRchar
=
curRchar
;
lastWchar
=
curWchar
;
lastRbyte
=
curRbyte
;
lastWbyte
=
curWbyte
;
return
false
;
}
*
r
eadKB
=
(
float
)((
double
)(
curReadbyte
-
lastReadbyte
)
/
1024
);
*
w
riteKB
=
(
float
)((
double
)(
curWritebyte
-
lastWritebyte
)
/
1024
);
if
(
*
r
eadKB
<
0
)
*
read
KB
=
0
;
if
(
*
w
riteKB
<
0
)
*
write
KB
=
0
;
*
r
charKB
=
(
float
)((
double
)(
curRchar
-
lastRchar
)
/
1024
);
*
w
charKB
=
(
float
)((
double
)(
curWchar
-
lastWchar
)
/
1024
);
if
(
*
r
charKB
<
0
)
*
rchar
KB
=
0
;
if
(
*
w
charKB
<
0
)
*
wchar
KB
=
0
;
lastReadbyte
=
curReadbyte
;
lastWritebyte
=
curWritebyte
;
*
rbyteKB
=
(
float
)((
double
)(
curRbyte
-
lastRbyte
)
/
1024
);
*
wbyteKB
=
(
float
)((
double
)(
curWbyte
-
lastWbyte
)
/
1024
);
if
(
*
rbyteKB
<
0
)
*
rbyteKB
=
0
;
if
(
*
wbyteKB
<
0
)
*
wbyteKB
=
0
;
lastRchar
=
curRchar
;
lastWchar
=
curWchar
;
lastRbyte
=
curRbyte
;
lastWbyte
=
curWbyte
;
return
true
;
}
...
...
@@ -217,11 +226,11 @@ void taosGetSystemInfo() {
tsNumOfCores
=
taosGetCpuCores
();
tsTotalMemoryMB
=
taosGetTotalMemory
();
float
tmp1
,
tmp2
;
float
tmp1
,
tmp2
,
tmp3
,
tmp4
;
// taosGetDisk();
taosGetBandSpeed
(
&
tmp1
);
taosGetCpuUsage
(
&
tmp1
,
&
tmp2
);
taosGetProcIO
(
&
tmp1
,
&
tmp2
);
taosGetProcIO
(
&
tmp1
,
&
tmp2
,
&
tmp3
,
&
tmp4
);
taosGetSystemTimezone
();
taosGetSystemLocale
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录