Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
aca953ec
G
glances
项目概览
蜕变的菜鸟
/
glances
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
glances
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
aca953ec
编写于
2月 25, 2018
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Glances 3.0 RC1] Client/Server is broken #1244
上级
f82eb4a1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
12 deletion
+11
-12
NEWS
NEWS
+1
-0
glances/plugins/glances_processlist.py
glances/plugins/glances_processlist.py
+8
-9
glances/processes.py
glances/processes.py
+2
-3
未找到文件。
NEWS
浏览文件 @
aca953ec
...
@@ -42,6 +42,7 @@ Bugs corrected:
...
@@ -42,6 +42,7 @@ Bugs corrected:
* FreeBSD blackhole bug #1202
* FreeBSD blackhole bug #1202
* Glances crashes when mountpoint with non ASCII characters exists #1201
* Glances crashes when mountpoint with non ASCII characters exists #1201
* [WEB UI] Minor issue on the Web UI #1240
* [WEB UI] Minor issue on the Web UI #1240
* [Glances 3.0 RC1] Client/Server is broken #1244
Backward-incompatible changes:
Backward-incompatible changes:
...
...
glances/plugins/glances_processlist.py
浏览文件 @
aca953ec
...
@@ -281,7 +281,7 @@ class Plugin(GlancesPlugin):
...
@@ -281,7 +281,7 @@ class Plugin(GlancesPlugin):
ret
.
append
(
self
.
curse_add_line
(
''
,
splittable
=
True
))
ret
.
append
(
self
.
curse_add_line
(
''
,
splittable
=
True
))
# Add extended stats but only for the top processes
# Add extended stats but only for the top processes
if
first
and
'extended_stats'
in
p
:
if
first
and
'extended_stats'
in
p
and
args
.
enable_process_extended
:
# Left padding
# Left padding
xpad
=
' '
*
13
xpad
=
' '
*
13
# First line is CPU affinity
# First line is CPU affinity
...
@@ -290,15 +290,12 @@ class Plugin(GlancesPlugin):
...
@@ -290,15 +290,12 @@ class Plugin(GlancesPlugin):
msg
=
xpad
+
'CPU affinity: '
+
str
(
len
(
p
[
'cpu_affinity'
]))
+
' cores'
msg
=
xpad
+
'CPU affinity: '
+
str
(
len
(
p
[
'cpu_affinity'
]))
+
' cores'
ret
.
append
(
self
.
curse_add_line
(
msg
,
splittable
=
True
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
splittable
=
True
))
# Second line is memory info
# Second line is memory info
if
'memory_info'
in
p
and
p
[
'memory_info'
]
is
not
None
:
if
'memory_info'
in
p
and
\
p
[
'memory_info'
]
is
not
None
:
ret
.
append
(
self
.
curse_new_line
())
ret
.
append
(
self
.
curse_new_line
())
msg
=
xpad
+
'Memory info: '
msg
=
'{}Memory info: {}'
.
format
(
xpad
,
p
[
'memory_info'
])
for
k
,
v
in
iteritems
(
p
[
'memory_info'
].
_asdict
()):
# Ignore rss and vms (already displayed)
if
k
not
in
[
'rss'
,
'vms'
]
and
v
is
not
None
:
msg
+=
self
.
auto_unit
(
v
,
low_precision
=
False
)
+
' '
+
k
+
' '
if
'memory_swap'
in
p
and
p
[
'memory_swap'
]
is
not
None
:
if
'memory_swap'
in
p
and
p
[
'memory_swap'
]
is
not
None
:
msg
+=
self
.
auto_unit
(
p
[
'memory_swap'
],
low_precision
=
False
)
+
' swap '
msg
+=
' swap '
+
self
.
auto_unit
(
p
[
'memory_swap'
],
low_precision
=
False
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
splittable
=
True
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
splittable
=
True
))
# Third line is for open files/network sessions
# Third line is for open files/network sessions
msg
=
''
msg
=
''
...
@@ -317,7 +314,9 @@ class Plugin(GlancesPlugin):
...
@@ -317,7 +314,9 @@ class Plugin(GlancesPlugin):
msg
=
xpad
+
'Open: '
+
msg
msg
=
xpad
+
'Open: '
+
msg
ret
.
append
(
self
.
curse_add_line
(
msg
,
splittable
=
True
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
splittable
=
True
))
# Fouth line is IO nice level (only Linux and Windows OS)
# Fouth line is IO nice level (only Linux and Windows OS)
if
'ionice'
in
p
and
p
[
'ionice'
]
is
not
None
:
if
'ionice'
in
p
and
\
p
[
'ionice'
]
is
not
None
\
and
hasattr
(
p
[
'ionice'
],
'ioclass'
):
ret
.
append
(
self
.
curse_new_line
())
ret
.
append
(
self
.
curse_new_line
())
msg
=
xpad
+
'IO nice: '
msg
=
xpad
+
'IO nice: '
k
=
'Class is '
k
=
'Class is '
...
...
glances/processes.py
浏览文件 @
aca953ec
...
@@ -268,7 +268,6 @@ class GlancesProcesses(object):
...
@@ -268,7 +268,6 @@ class GlancesProcesses(object):
# Get extended stats, only for top processes (see issue #403).
# Get extended stats, only for top processes (see issue #403).
# - cpu_affinity (Linux, Windows, FreeBSD)
# - cpu_affinity (Linux, Windows, FreeBSD)
# - ionice (Linux and Windows > Vista)
# - ionice (Linux and Windows > Vista)
# - memory_full_info (Linux)
# - num_ctx_switches (not available on Illumos/Solaris)
# - num_ctx_switches (not available on Illumos/Solaris)
# - num_fds (Unix-like)
# - num_fds (Unix-like)
# - num_handles (Windows)
# - num_handles (Windows)
...
@@ -280,8 +279,8 @@ class GlancesProcesses(object):
...
@@ -280,8 +279,8 @@ class GlancesProcesses(object):
try
:
try
:
top_process
=
psutil
.
Process
(
proc
[
'pid'
])
top_process
=
psutil
.
Process
(
proc
[
'pid'
])
extended_stats
=
[
'cpu_affinity'
,
'ionice'
,
extended_stats
=
[
'cpu_affinity'
,
'ionice'
,
'
memory_full_info'
,
'num_ctx_switche
s'
,
'
num_ctx_switches'
,
'num_fd
s'
,
'num_
fds'
,
'num_
threads'
]
'num_threads'
]
if
WINDOWS
:
if
WINDOWS
:
extended_stats
+=
[
'num_handles'
]
extended_stats
+=
[
'num_handles'
]
extended
=
top_process
.
as_dict
(
attrs
=
extended_stats
)
extended
=
top_process
.
as_dict
(
attrs
=
extended_stats
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录