Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
1f8e6efe
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 搜索 >>
提交
1f8e6efe
编写于
10月 12, 2019
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add --enable-plugin options from the command line
上级
a61c91b1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
5 deletion
+28
-5
docs/aoa/sensors.rst
docs/aoa/sensors.rst
+3
-0
docs/cmds.rst
docs/cmds.rst
+4
-0
docs/config.rst
docs/config.rst
+1
-1
docs/man/glances.1
docs/man/glances.1
+10
-2
glances/main.py
glances/main.py
+10
-2
未找到文件。
docs/aoa/sensors.rst
浏览文件 @
1f8e6efe
...
...
@@ -15,3 +15,6 @@ There is no alert on this information.
.. note::
Limit values and sensors alias names can be defined in the
configuration file under the ``[sensors]`` section.
.. note::
This plugin is disabled by default in the configuration file.
docs/cmds.rst
浏览文件 @
1f8e6efe
...
...
@@ -30,6 +30,10 @@ Command-Line Options
disable PLUGIN (comma separed list)
.. option:: --enable-plugin PLUGIN
enable PLUGIN (comma separed list)
.. option:: --stdout PLUGINS_STATS
display stats to stdout (comma separated list of plugins/plugins.attribute)
...
...
docs/config.rst
浏览文件 @
1f8e6efe
...
...
@@ -48,7 +48,7 @@ have a section. Below an example for the CPU plugin:
.. code-block:: ini
[cpu]
disable=
f
alse
disable=
F
alse
user_careful=50
user_warning=70
user_critical=90
...
...
docs/man/glances.1
浏览文件 @
1f8e6efe
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "Oct
07
, 2019" "3.1.3_BETA" "Glances"
.TH "GLANCES" "1" "Oct
12
, 2019" "3.1.3_BETA" "Glances"
.SH NAME
glances \- An eye on your system
.
...
...
@@ -78,6 +78,11 @@ disable PLUGIN (comma separed list)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-enable\-plugin PLUGIN
enable PLUGIN (comma separed list)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-stdout PLUGINS_STATS
display stats to stdout (comma separated list of plugins/plugins.attribute)
.UNINDENT
...
...
@@ -389,6 +394,9 @@ Sort processes by I/O rate
.B \fBI\fP
Show/hide IP module
.TP
.B \fBk\fP
Show/hide TCP connections
.TP
.B \fBl\fP
Show/hide log messages
.TP
...
...
@@ -569,7 +577,7 @@ have a section. Below an example for the CPU plugin:
.nf
.ft C
[cpu]
disable=
f
alse
disable=
F
alse
user_careful=50
user_warning=70
user_critical=90
...
...
glances/main.py
浏览文件 @
1f8e6efe
...
...
@@ -98,8 +98,11 @@ Examples of use:
Display CSV stats to stdout (all stats in one line):
$ glances --stdout-csv now,cpu.user,mem.used,load
Disable some plugins (
any modes
):
Disable some plugins (
comma separated list
):
$ glances --disable-plugin network,ports
Enable some plugins (comma separated list):
$ glances --enable-plugin sensors
"""
def
__init__
(
self
):
...
...
@@ -126,8 +129,10 @@ Examples of use:
action
=
'store_true'
,
default
=
False
,
dest
=
'modules_list'
,
help
=
'display modules (plugins & exports) list and exit'
)
parser
.
add_argument
(
'--disable-plugin'
,
dest
=
'disable_plugin'
,
parser
.
add_argument
(
'--disable-plugin'
,
'--disable-plugins'
,
dest
=
'disable_plugin'
,
help
=
'disable plugin (comma separed list)'
)
parser
.
add_argument
(
'--enable-plugin'
,
'--enable-plugins'
,
dest
=
'enable_plugin'
,
help
=
'enable plugin (comma separed list)'
)
parser
.
add_argument
(
'--disable-process'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'disable_process'
,
help
=
'disable process module'
)
# Enable or disable option
...
...
@@ -277,6 +282,9 @@ Examples of use:
if
args
.
disable_plugin
is
not
None
:
for
p
in
args
.
disable_plugin
.
split
(
','
):
disable
(
args
,
p
)
if
args
.
enable_plugin
is
not
None
:
for
p
in
args
.
enable_plugin
.
split
(
','
):
enable
(
args
,
p
)
# Exporters activation
if
args
.
export
is
not
None
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录