Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
b70e916c
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 搜索 >>
提交
b70e916c
编写于
10月 22, 2015
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add reset key for process summary min/max
上级
1b18e3f4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
3 deletion
+32
-3
NEWS
NEWS
+2
-1
docs/glances-doc.rst
docs/glances-doc.rst
+4
-0
glances/outputs/glances_curses.py
glances/outputs/glances_curses.py
+6
-0
glances/plugins/glances_processlist.py
glances/plugins/glances_processlist.py
+14
-2
man/glances.1
man/glances.1
+6
-0
未找到文件。
NEWS
浏览文件 @
b70e916c
...
...
@@ -7,7 +7,8 @@ Version 2.x
Enhancements and new features:
* [WebUI] add "pointer" cursor for sortable columns (issue #704 from @notFloran)
* Add process summary min/max stats (issue #703)
* [WebUI] add "pointer" cursor for sortable columns (issue #704 from @notFloran)
Version 2.5.1
=============
...
...
docs/glances-doc.rst
浏览文件 @
b70e916c
...
...
@@ -258,6 +258,8 @@ The following commands (key pressed) are supported while in Glances:
Show/hide log messages
``m``
Sort processes by MEM usage
``M``
Reset processes summary min/max
``n``
Show/hide network stats
``p``
...
...
@@ -266,6 +268,8 @@ The following commands (key pressed) are supported while in Glances:
Quit the current Glances session
``r``
Reset history
``R``
Show/Hide RAID plugins
``s``
Show/hide sensors stats
``t``
...
...
glances/outputs/glances_curses.py
浏览文件 @
b70e916c
...
...
@@ -85,6 +85,9 @@ class _GlancesCurses(object):
# Init edit filter tag
self
.
edit_filter
=
False
# Init the process min/max reset
self
.
args
.
reset_minmax_tag
=
False
# Catch key pressed with non blocking mode
self
.
no_flash_cursor
()
self
.
term_window
.
nodelay
(
1
)
...
...
@@ -350,6 +353,9 @@ class _GlancesCurses(object):
# 'm' > Sort processes by MEM usage
glances_processes
.
auto_sort
=
False
glances_processes
.
sort_key
=
'memory_percent'
elif
self
.
pressedkey
==
ord
(
'M'
):
# 'M' > Reset processes summary min/max
self
.
args
.
reset_minmax_tag
=
not
self
.
args
.
reset_minmax_tag
elif
self
.
pressedkey
==
ord
(
'n'
):
# 'n' > Show/hide network stats
self
.
args
.
disable_network
=
not
self
.
args
.
disable_network
...
...
glances/plugins/glances_processlist.py
浏览文件 @
b70e916c
...
...
@@ -421,6 +421,9 @@ class Plugin(GlancesPlugin):
# End of extended stats
first
=
False
if
glances_processes
.
process_filter
is
not
None
:
if
args
.
reset_minmax_tag
:
args
.
reset_minmax_tag
=
not
args
.
reset_minmax_tag
self
.
__mmm_reset
()
self
.
__msg_curse_sum
(
ret
,
args
=
args
)
self
.
__msg_curse_sum
(
ret
,
mmm
=
'min'
,
args
=
args
)
self
.
__msg_curse_sum
(
ret
,
mmm
=
'max'
,
args
=
args
)
...
...
@@ -540,10 +543,12 @@ class Plugin(GlancesPlugin):
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
,
additional
=
True
))
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
,
additional
=
True
))
if
mmm
is
None
:
msg
=
' < {0
:8
}'
.
format
(
'current'
)
msg
=
' < {0}'
.
format
(
'current'
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
))
else
:
msg
=
' < {0:8}'
.
format
(
mmm
)
msg
=
' < {0}'
.
format
(
mmm
)
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
))
msg
=
' (
\'
M
\'
to reset)'
ret
.
append
(
self
.
curse_add_line
(
msg
,
optional
=
True
))
def
__mmm_deco
(
self
,
mmm
):
...
...
@@ -555,6 +560,13 @@ class Plugin(GlancesPlugin):
else
:
return
'FILTER'
def
__mmm_reset
(
self
):
"""
Reset the MMM stats
"""
self
.
mmm_min
=
{}
self
.
mmm_max
=
{}
def
__sum_stats
(
self
,
key
,
indice
=
None
,
mmm
=
None
):
"""
Return the sum of the stats value for the given key
...
...
man/glances.1
浏览文件 @
b70e916c
...
...
@@ -228,6 +228,9 @@ Show/hide log messages
.B m
Sort processes by MEM usage
.TP
.B M
Reset processes summary min/max
.TP
.B n
Show/hide network stats
.TP
...
...
@@ -240,6 +243,9 @@ Quit
.B r
Reset history
.TP
.B R
Disable/enable RAID plugins
.TP
.B s
Show/hide sensors stats
.TP
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录