Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
f354d1a2
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 搜索 >>
提交
f354d1a2
编写于
6月 05, 2021
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correct issue with bad key for AMPS
上级
e135dc33
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
33 addition
and
16 deletion
+33
-16
conf/glances.conf
conf/glances.conf
+6
-2
docs/gw/influxdb.rst
docs/gw/influxdb.rst
+10
-5
docs/man/glances.1
docs/man/glances.1
+1
-1
glances/__init__.py
glances/__init__.py
+1
-1
glances/outputs/glances_stdout_issue.py
glances/outputs/glances_stdout_issue.py
+10
-6
glances/plugins/glances_amps.py
glances/plugins/glances_amps.py
+5
-1
未找到文件。
conf/glances.conf
浏览文件 @
f354d1a2
...
...
@@ -10,8 +10,8 @@ refresh=2
# Does Glances should check if a newer version is available on PyPI ?
check_update
=
false
# History size (maximum number of values)
# Default is
28800: 1 day with 1 point every 3 seconds
history_size
=
288
00
# Default is
3600 seconds (1 hour)
history_size
=
36
00
##############################################################################
# User interface
...
...
@@ -388,6 +388,10 @@ max_name_size=20
# Set the following key to True to display all containers
all
=
False
[
amps
]
# AMPs configuration are defined in the bottom of this file
disable
=
False
##############################################################################
# Client/server
##############################################################################
...
...
docs/gw/influxdb.rst
浏览文件 @
f354d1a2
...
...
@@ -5,7 +5,7 @@ InfluxDB
You can export statistics to an ``InfluxDB`` server (time series server).
In Glances version 3.
1.8
and higher, the way Glances exports stats to
In Glances version 3.
2.0
and higher, the way Glances exports stats to
InfluxDB changes. The following fields will be added as tags:
- key stats (for example *interface_name* for network, container *name* for docker...)
...
...
@@ -21,10 +21,15 @@ Glances InfluxDB data model:
| | system | |
| | iowait... | |
+---------------+-----------------------+-----------------------+
| network | rx | |
| | tx | |
| | time_since_update... | hostname |
| | | interface_name |
| network | read_bytes | hostname |
| | write_bytes | disk_name |
| | time_since_update... | |
| | | |
+---------------+-----------------------+-----------------------+
| diskio | rx | hostname |
| | tx | interface_name |
| | time_since_update... | |
| | | |
+---------------+-----------------------+-----------------------+
| docker | cpu_percent | hostname |
| | memory_usage... | name |
...
...
docs/man/glances.1
浏览文件 @
f354d1a2
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "
May 29, 2021" "3.1.8b9
" "Glances"
.TH "GLANCES" "1" "
Jun 05, 2021" "3.2.0b0
" "Glances"
.SH NAME
glances \- An eye on your system
.
...
...
glances/__init__.py
浏览文件 @
f354d1a2
...
...
@@ -29,7 +29,7 @@ import sys
# Global name
# Version should start and end with a numerical char
# See https://packaging.python.org/specifications/core-metadata/#version
__version__
=
'3.
1.8b9
'
__version__
=
'3.
2.0b0
'
__author__
=
'Nicolas Hennion <nicolas@nicolargo.com>'
__license__
=
'LGPLv3'
...
...
glances/outputs/glances_stdout_issue.py
浏览文件 @
f354d1a2
...
...
@@ -65,7 +65,7 @@ class GlancesStdoutIssue(object):
def
print_version
(
self
):
msg
=
'Glances version {} with PsUtil {}'
.
format
(
colors
.
BLUE
+
__version__
+
colors
.
NO
,
colors
.
BLUE
+
__version__
+
colors
.
NO
,
colors
.
BLUE
+
psutil_version
+
colors
.
NO
)
sys
.
stdout
.
write
(
'='
*
len
(
msg
)
+
'
\n
'
)
sys
.
stdout
.
write
(
msg
)
...
...
@@ -89,7 +89,7 @@ class GlancesStdoutIssue(object):
if
stats
.
_plugins
[
plugin
].
is_disable
():
# If current plugin is disable
# then continue to next plugin
result
=
colors
.
ORANGE
+
'[N/A]'
.
rjust
(
19
-
len
(
plugin
))
result
=
colors
.
NO
+
'[N/A]'
.
rjust
(
19
-
len
(
plugin
))
message
=
colors
.
NO
self
.
print_issue
(
plugin
,
result
,
message
)
continue
...
...
@@ -109,14 +109,18 @@ class GlancesStdoutIssue(object):
result
=
(
colors
.
GREEN
+
'[OK] '
+
colors
.
BLUE
+
' {:.4f}s '
.
format
(
counter
.
get
())).
rjust
(
40
-
len
(
plugin
))
message
=
colors
.
NO
+
str
(
stat
)[
0
:
TERMINAL_WIDTH
-
40
]
' {:.5f}s '
.
format
(
counter
.
get
())).
rjust
(
41
-
len
(
plugin
))
if
isinstance
(
stat
,
list
)
and
len
(
stat
)
>
0
and
'key'
in
stat
[
0
]:
key
=
'key={} '
.
format
(
stat
[
0
][
'key'
])
message
=
colors
.
ORANGE
+
key
+
colors
.
NO
+
str
(
stat
)[
0
:
TERMINAL_WIDTH
-
41
-
len
(
key
)]
else
:
message
=
colors
.
NO
+
str
(
stat
)[
0
:
TERMINAL_WIDTH
-
41
]
else
:
result
=
(
colors
.
RED
+
'[ERROR]'
+
colors
.
BLUE
+
' {:.
4f}s '
.
format
(
counter
.
get
())).
rjust
(
40
-
len
(
plugin
))
message
=
colors
.
NO
+
str
(
stat_error
)[
0
:
TERMINAL_WIDTH
-
4
0
]
' {:.
5f}s '
.
format
(
counter
.
get
())).
rjust
(
41
-
len
(
plugin
))
message
=
colors
.
NO
+
str
(
stat_error
)[
0
:
TERMINAL_WIDTH
-
4
1
]
self
.
print_issue
(
plugin
,
result
,
message
)
# Return True to exit directly (no refresh)
...
...
glances/plugins/glances_amps.py
浏览文件 @
f354d1a2
...
...
@@ -41,6 +41,10 @@ class Plugin(GlancesPlugin):
# Init the list of AMP (classe define in the glances/amps_list.py script)
self
.
glances_amps
=
glancesAmpsList
(
self
.
args
,
self
.
config
)
def
get_key
(
self
):
"""Return the key of the list."""
return
'name'
@
GlancesPlugin
.
_check_decorator
@
GlancesPlugin
.
_log_result_decorator
def
update
(
self
):
...
...
@@ -50,7 +54,7 @@ class Plugin(GlancesPlugin):
if
self
.
input_method
==
'local'
:
for
k
,
v
in
iteritems
(
self
.
glances_amps
.
update
()):
stats
.
append
({
'key'
:
k
,
stats
.
append
({
'key'
:
self
.
get_key
()
,
'name'
:
v
.
NAME
,
'result'
:
v
.
result
(),
'refresh'
:
v
.
refresh
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录