Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
be0c7f8c
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 搜索 >>
提交
be0c7f8c
编写于
8月 01, 2021
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'issue1903' into develop
上级
ba1af75e
a9ebdf18
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
267 addition
and
251 deletion
+267
-251
Makefile
Makefile
+1
-0
docs/aoa/ps.rst
docs/aoa/ps.rst
+13
-0
docs/api.rst
docs/api.rst
+229
-243
docs/man/glances.1
docs/man/glances.1
+1
-1
glances/main.py
glances/main.py
+5
-0
glances/outputs/glances_curses.py
glances/outputs/glances_curses.py
+2
-3
glances/outputs/static/package-lock.json
glances/outputs/static/package-lock.json
+4
-4
glances/outputs/static/public/glances.js
glances/outputs/static/public/glances.js
+0
-0
glances/outputs/static/public/glances.map.js
glances/outputs/static/public/glances.map.js
+0
-0
glances/plugins/glances_processlist.py
glances/plugins/glances_processlist.py
+4
-0
glances/processes.py
glances/processes.py
+8
-0
未找到文件。
Makefile
浏览文件 @
be0c7f8c
...
...
@@ -12,6 +12,7 @@ venv-dev:
./venv/bin/pip
install
-r
doc-requirements.txt
venv-dev-upgrade
:
./venv/bin/pip
install
--upgrade
pip
./venv/bin/pip
install
--upgrade
-r
dev-requirements.txt
./venv/bin/pip
install
--upgrade
-r
doc-requirements.txt
...
...
docs/aoa/ps.rst
浏览文件 @
be0c7f8c
...
...
@@ -38,6 +38,19 @@ automatically sorted by:
- ``MEM``: if a memory alert is detected
- ``DISK I/O``: if a CPU iowait alert is detected
You can also set the sort key in the UI:
- by clicking on left and right arrows
- by clicking on the following shortcuts or command line option:
===== ==================== ===============================
``a`` Automatic sort
``c`` Sort by CPU --sort-processes cpu_percent
``i`` Sort by DISK I/O --sort-processes io_counters
``m`` Sort by MEM --sort-processes memory_percent
``p`` Sort by process name --sort-processes name
``t`` Sort by CPU times --sort-processes cpu_times
``u`` Sort by username --sort-processes username
The number of processes in the list is adapted to the screen size.
Columns display
...
...
docs/api.rst
浏览文件 @
be0c7f8c
此差异已折叠。
点击以展开。
docs/man/glances.1
浏览文件 @
be0c7f8c
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "
Jul 24, 2021" "3.2.2
" "Glances"
.TH "GLANCES" "1" "
Aug 01, 2021" "3.2.3_beta1
" "Glances"
.SH NAME
glances \- An eye on your system
.
...
...
glances/main.py
浏览文件 @
be0c7f8c
...
...
@@ -27,6 +27,7 @@ from glances import __version__, psutil_version
from
glances.compat
import
input
,
disable
,
enable
from
glances.config
import
Config
from
glances.globals
import
WINDOWS
from
glances.processes
import
sort_processes_key_list
from
glances.logger
import
logger
,
LOG_FILENAME
...
...
@@ -157,6 +158,10 @@ Examples of use:
dest
=
'enable_irq'
,
help
=
'enable IRQ module'
),
parser
.
add_argument
(
'--enable-process-extended'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'enable_process_extended'
,
help
=
'enable extended stats on top process'
)
# Sort processes list
parser
.
add_argument
(
'--sort-processes'
,
dest
=
'sort_processes_key'
,
choices
=
sort_processes_key_list
,
help
=
'Sort processes by: {}'
.
format
(
', '
.
join
(
sort_processes_key_list
)))
# Export modules feature
parser
.
add_argument
(
'--export'
,
dest
=
'export'
,
help
=
'enable export module (comma separed list)'
)
...
...
glances/outputs/glances_curses.py
浏览文件 @
be0c7f8c
...
...
@@ -26,7 +26,7 @@ from glances.compat import nativestr, u, itervalues, enable, disable
from
glances.globals
import
MACOS
,
WINDOWS
from
glances.logger
import
logger
from
glances.events
import
glances_events
from
glances.processes
import
glances_processes
from
glances.processes
import
glances_processes
,
sort_processes_key_list
from
glances.timer
import
Timer
# Import curses library for "normal" operating system
...
...
@@ -106,8 +106,7 @@ class _GlancesCurses(object):
# 'DOWN' > Down in the server list
}
_sort_loop
=
[
'cpu_percent'
,
'memory_percent'
,
'username'
,
'cpu_times'
,
'io_counters'
,
'name'
]
_sort_loop
=
sort_processes_key_list
# Define top menu
_top
=
[
'quicklook'
,
'cpu'
,
'percpu'
,
'gpu'
,
'mem'
,
'memswap'
,
'load'
]
...
...
glances/outputs/static/package-lock.json
浏览文件 @
be0c7f8c
...
...
@@ -722,7 +722,7 @@
},
"chalk"
:
{
"version"
:
"1.1.3"
,
"resolved"
:
"http
s
://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
,
"resolved"
:
"http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
,
"integrity"
:
"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -1997,7 +1997,7 @@
"dependencies"
:
{
"combined-stream"
:
{
"version"
:
"1.0.6"
,
"resolved"
:
"http
s
://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz"
,
"resolved"
:
"http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz"
,
"integrity"
:
"sha1-cj599ugBrFYTETp+RFqbactjKBg="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -2995,7 +2995,7 @@
},
"load-json-file"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz"
,
"integrity"
:
"sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -3806,7 +3806,7 @@
},
"os-locale"
:
{
"version"
:
"1.4.0"
,
"resolved"
:
"http
s
://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz"
,
"resolved"
:
"http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz"
,
"integrity"
:
"sha1-IPnxeuKe00XoveWDsT0gCYA8FNk="
,
"dev"
:
true
,
"requires"
:
{
...
...
glances/outputs/static/public/glances.js
浏览文件 @
be0c7f8c
此差异由.gitattributes 抑制。
glances/outputs/static/public/glances.map.js
浏览文件 @
be0c7f8c
此差异由.gitattributes 抑制。
glances/plugins/glances_processlist.py
浏览文件 @
be0c7f8c
...
...
@@ -124,6 +124,10 @@ class Plugin(GlancesPlugin):
config
.
as_dict
()[
'processlist'
][
'sort_key'
]))
glances_processes
.
set_sort_key
(
config
.
as_dict
()[
'processlist'
][
'sort_key'
],
False
)
# The default sort key could also be overwrite by command line (see #1903)
if
args
.
sort_processes_key
is
not
None
:
glances_processes
.
set_sort_key
(
args
.
sort_processes_key
,
False
)
# Note: 'glances_processes' is already init in the processes.py script
def
get_key
(
self
):
...
...
glances/processes.py
浏览文件 @
be0c7f8c
...
...
@@ -27,6 +27,14 @@ from glances.logger import logger
import
psutil
# This constant defines the list of available processes sort key
sort_processes_key_list
=
[
'cpu_percent'
,
'memory_percent'
,
'username'
,
'cpu_times'
,
'io_counters'
,
'name'
]
class
GlancesProcesses
(
object
):
"""Get processed stats using the psutil library."""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录