Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
b19b1f54
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,发现更多精彩内容 >>
提交
b19b1f54
编写于
10月 28, 2016
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add --disable-<option> for all plugins. Should be refactor...
上级
9104f439
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
71 addition
and
2 deletion
+71
-2
glances/plugins/glances_cpu.py
glances/plugins/glances_cpu.py
+6
-0
glances/plugins/glances_diskio.py
glances/plugins/glances_diskio.py
+5
-0
glances/plugins/glances_folders.py
glances/plugins/glances_folders.py
+5
-0
glances/plugins/glances_fs.py
glances/plugins/glances_fs.py
+5
-0
glances/plugins/glances_ip.py
glances/plugins/glances_ip.py
+5
-0
glances/plugins/glances_irq.py
glances/plugins/glances_irq.py
+4
-1
glances/plugins/glances_load.py
glances/plugins/glances_load.py
+5
-0
glances/plugins/glances_mem.py
glances/plugins/glances_mem.py
+5
-0
glances/plugins/glances_memswap.py
glances/plugins/glances_memswap.py
+5
-0
glances/plugins/glances_network.py
glances/plugins/glances_network.py
+5
-0
glances/plugins/glances_percpu.py
glances/plugins/glances_percpu.py
+5
-0
glances/plugins/glances_ports.py
glances/plugins/glances_ports.py
+3
-0
glances/plugins/glances_raid.py
glances/plugins/glances_raid.py
+5
-0
glances/plugins/glances_sensors.py
glances/plugins/glances_sensors.py
+5
-0
glances/plugins/glances_wifi.py
glances/plugins/glances_wifi.py
+3
-1
未找到文件。
glances/plugins/glances_cpu.py
浏览文件 @
b19b1f54
...
...
@@ -68,6 +68,8 @@ class Plugin(GlancesPlugin):
"""Init the CPU plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -88,9 +90,13 @@ class Plugin(GlancesPlugin):
@
GlancesPlugin
.
_log_result_decorator
def
update
(
self
):
"""Update CPU stats using the input method."""
# Reset stats
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_cpu
:
return
self
.
stats
# Grab stats into self.stats
if
self
.
input_method
==
'local'
:
self
.
update_local
()
...
...
glances/plugins/glances_diskio.py
浏览文件 @
b19b1f54
...
...
@@ -51,6 +51,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -72,6 +74,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_diskio
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the standard system lib
# Grab the stat using the PsUtil disk_io_counters method
...
...
glances/plugins/glances_folders.py
浏览文件 @
b19b1f54
...
...
@@ -33,6 +33,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -59,6 +61,9 @@ class Plugin(GlancesPlugin):
# Reset the list
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_folder
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Folder list only available in a full Glances environment
# Check if the glances_folder instance is init
...
...
glances/plugins/glances_fs.py
浏览文件 @
b19b1f54
...
...
@@ -75,6 +75,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -96,6 +98,9 @@ class Plugin(GlancesPlugin):
# Reset the list
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_fs
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the standard system lib
...
...
glances/plugins/glances_ip.py
浏览文件 @
b19b1f54
...
...
@@ -62,6 +62,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -85,6 +87,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
.
disable_ip
:
return
self
.
stats
if
self
.
input_method
==
'local'
and
netifaces_tag
:
# Update stats using the netifaces lib
try
:
...
...
glances/plugins/glances_irq.py
浏览文件 @
b19b1f54
...
...
@@ -36,6 +36,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -60,7 +62,8 @@ class Plugin(GlancesPlugin):
# Reset the list
self
.
reset
()
if
not
LINUX
:
# only available on GNU/Linux
# IRQ plugin only available on GNU/Linux
if
not
LINUX
or
self
.
args
.
disable_irq
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
...
...
glances/plugins/glances_load.py
浏览文件 @
b19b1f54
...
...
@@ -58,6 +58,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -81,6 +83,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_load
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the standard system lib
...
...
glances/plugins/glances_mem.py
浏览文件 @
b19b1f54
...
...
@@ -66,6 +66,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -83,6 +85,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_mem
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the standard system lib
# Grab MEM using the PSUtil virtual_memory method
...
...
glances/plugins/glances_memswap.py
浏览文件 @
b19b1f54
...
...
@@ -54,6 +54,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -71,6 +73,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
.
disable_swap
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the standard system lib
# Grab SWAP using the PSUtil swap_memory method
...
...
glances/plugins/glances_network.py
浏览文件 @
b19b1f54
...
...
@@ -59,6 +59,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
,
items_history_list
=
items_history_list
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -83,6 +85,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_network
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the standard system lib
...
...
glances/plugins/glances_percpu.py
浏览文件 @
b19b1f54
...
...
@@ -35,6 +35,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -56,6 +58,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
is
not
None
and
self
.
args
.
disable_cpu
:
return
self
.
stats
# Grab per-CPU stats using psutil's cpu_percent(percpu=True) and
# cpu_times_percent(percpu=True) methods
if
self
.
input_method
==
'local'
:
...
...
glances/plugins/glances_ports.py
浏览文件 @
b19b1f54
...
...
@@ -66,6 +66,9 @@ class Plugin(GlancesPlugin):
def
update
(
self
):
"""Update the ports list."""
if
self
.
args
.
disable_ports
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Only refresh:
# * if there is not other scanning thread
...
...
glances/plugins/glances_raid.py
浏览文件 @
b19b1f54
...
...
@@ -41,6 +41,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -58,6 +60,9 @@ class Plugin(GlancesPlugin):
# Reset stats
self
.
reset
()
if
self
.
args
.
disable_raid
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the PyMDstat lib (https://github.com/nicolargo/pymdstat)
try
:
...
...
glances/plugins/glances_sensors.py
浏览文件 @
b19b1f54
...
...
@@ -53,6 +53,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# Init the sensor class
self
.
glancesgrabsensors
=
GlancesGrabSensors
()
...
...
@@ -85,6 +87,9 @@ class Plugin(GlancesPlugin):
# Reset the stats
self
.
reset
()
if
self
.
args
.
disable_sensors
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
# Update stats using the dedicated lib
self
.
stats
=
[]
...
...
glances/plugins/glances_wifi.py
浏览文件 @
b19b1f54
...
...
@@ -49,6 +49,8 @@ class Plugin(GlancesPlugin):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
self
.
args
=
args
# We want to display the stat in the curse interface
self
.
display_curse
=
True
...
...
@@ -82,7 +84,7 @@ class Plugin(GlancesPlugin):
self
.
reset
()
# Exist if we can not grab the stats
if
not
wifi_tag
:
if
not
wifi_tag
or
self
.
args
.
disable_wifi
:
return
self
.
stats
if
self
.
input_method
==
'local'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录