Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
27c8c829
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 搜索 >>
提交
27c8c829
编写于
5月 08, 2018
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update docs
上级
7f15c342
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
18 deletion
+24
-18
docs/aoa/ps.rst
docs/aoa/ps.rst
+2
-1
glances/plugins/glances_processlist.py
glances/plugins/glances_processlist.py
+22
-17
未找到文件。
docs/aoa/ps.rst
浏览文件 @
27c8c829
...
...
@@ -63,6 +63,8 @@ Columns display
using (what's currently in the physical memory).
``PID`` Process ID
``USER`` User ID
``THR`` Threads number of the process
``TIME+`` Cumulative CPU time used by the process
``NI`` Nice level of the process
``S`` Process status
...
...
@@ -75,7 +77,6 @@ Columns display
- ``T``: traced/stopped by job control signal
- ``X``: dead (should never be seen)
``TIME+`` Cumulative CPU time used by the process
``R/s`` Per process I/O read rate in B/s
``W/s`` Per process I/O write rate in B/s
``COMMAND`` Process command line or command name
...
...
glances/plugins/glances_processlist.py
浏览文件 @
27c8c829
...
...
@@ -489,67 +489,72 @@ class Plugin(GlancesPlugin):
ret
.
append
(
self
.
curse_add_line
(
sep_char
*
69
))
ret
.
append
(
self
.
curse_new_line
())
# CPU percent sum
msg
=
'{:>6.1f}'
.
format
(
self
.
__sum_stats
(
'cpu_percent'
,
mmm
=
mmm
))
msg
=
self
.
layout_stat
[
'cpu'
]
.
format
(
self
.
__sum_stats
(
'cpu_percent'
,
mmm
=
mmm
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
decoration
=
self
.
__mmm_deco
(
mmm
)))
# MEM percent sum
msg
=
'{:>6.1f}'
.
format
(
self
.
__sum_stats
(
'memory_percent'
,
mmm
=
mmm
))
msg
=
self
.
layout_stat
[
'mem'
]
.
format
(
self
.
__sum_stats
(
'memory_percent'
,
mmm
=
mmm
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
decoration
=
self
.
__mmm_deco
(
mmm
)))
# VIRT and RES memory sum
if
'memory_info'
in
self
.
stats
[
0
]
and
self
.
stats
[
0
][
'memory_info'
]
is
not
None
and
self
.
stats
[
0
][
'memory_info'
]
!=
''
:
# VMS
msg
=
'{:>6}'
.
format
(
self
.
auto_unit
(
self
.
__sum_stats
(
'memory_info'
,
indice
=
1
,
mmm
=
mmm
),
low_precision
=
False
))
msg
=
self
.
layout_stat
[
'virt'
]
.
format
(
self
.
auto_unit
(
self
.
__sum_stats
(
'memory_info'
,
indice
=
1
,
mmm
=
mmm
),
low_precision
=
False
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
decoration
=
self
.
__mmm_deco
(
mmm
),
optional
=
True
))
# RSS
msg
=
'{:>6}'
.
format
(
self
.
auto_unit
(
self
.
__sum_stats
(
'memory_info'
,
indice
=
0
,
mmm
=
mmm
),
low_precision
=
False
))
msg
=
self
.
layout_stat
[
'res'
]
.
format
(
self
.
auto_unit
(
self
.
__sum_stats
(
'memory_info'
,
indice
=
0
,
mmm
=
mmm
),
low_precision
=
False
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
decoration
=
self
.
__mmm_deco
(
mmm
),
optional
=
True
))
else
:
msg
=
'{:>6}'
.
format
(
''
)
msg
=
self
.
layout_header
[
'virt'
]
.
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
msg
=
self
.
layout_header
[
'res'
].
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
# PID
msg
=
'{:>6}'
.
format
(
''
)
msg
=
self
.
layout_header
[
'pid'
].
format
(
''
,
width
=
self
.
__max_pid_size
()
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
# USER
msg
=
' {:9}'
.
format
(
''
)
msg
=
self
.
layout_header
[
'user'
].
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
# TIME+
msg
=
self
.
layout_header
[
'time'
].
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
))
# THREAD
msg
=
self
.
layout_header
[
'thread'
].
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
# NICE
msg
=
'{:>5}'
.
format
(
''
)
msg
=
self
.
layout_header
[
'nice'
]
.
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
# STATUS
msg
=
'{:>2}'
.
format
(
''
)
msg
=
self
.
layout_header
[
'status'
]
.
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
))
# TIME+
msg
=
'{:>10}'
.
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
))
# IO read/write
if
'io_counters'
in
self
.
stats
[
0
]
and
mmm
is
None
:
# IO read
io_rs
=
int
((
self
.
__sum_stats
(
'io_counters'
,
0
)
-
self
.
__sum_stats
(
'io_counters'
,
indice
=
2
,
mmm
=
mmm
))
/
self
.
stats
[
0
][
'time_since_update'
])
if
io_rs
==
0
:
msg
=
'{:>6}'
.
format
(
'0'
)
msg
=
self
.
layout_stat
[
'ior'
]
.
format
(
'0'
)
else
:
msg
=
'{:>6}'
.
format
(
self
.
auto_unit
(
io_rs
,
low_precision
=
True
))
msg
=
self
.
layout_stat
[
'ior'
]
.
format
(
self
.
auto_unit
(
io_rs
,
low_precision
=
True
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
decoration
=
self
.
__mmm_deco
(
mmm
),
optional
=
True
,
additional
=
True
))
# IO write
io_ws
=
int
((
self
.
__sum_stats
(
'io_counters'
,
1
)
-
self
.
__sum_stats
(
'io_counters'
,
indice
=
3
,
mmm
=
mmm
))
/
self
.
stats
[
0
][
'time_since_update'
])
if
io_ws
==
0
:
msg
=
'{:>6}'
.
format
(
'0'
)
msg
=
self
.
layout_stat
[
'iow'
]
.
format
(
'0'
)
else
:
msg
=
'{:>6}'
.
format
(
self
.
auto_unit
(
io_ws
,
low_precision
=
True
))
msg
=
self
.
layout_stat
[
'iow'
]
.
format
(
self
.
auto_unit
(
io_ws
,
low_precision
=
True
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
decoration
=
self
.
__mmm_deco
(
mmm
),
optional
=
True
,
additional
=
True
))
else
:
msg
=
'{:>6}'
.
format
(
''
)
msg
=
self
.
layout_header
[
'ior'
]
.
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
,
additional
=
True
))
msg
=
self
.
layout_header
[
'iow'
].
format
(
''
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
,
additional
=
True
))
if
mmm
is
None
:
msg
=
' < {}'
.
format
(
'current'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录