Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
e57eef14
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,发现更多精彩内容 >>
提交
e57eef14
编写于
4月 24, 2016
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Doc updated. Have to test it with degraded cases
上级
83b098a1
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
52 addition
and
15 deletion
+52
-15
NEWS
NEWS
+1
-0
docs/_static/amps.png
docs/_static/amps.png
+0
-0
docs/aoa/index.rst
docs/aoa/index.rst
+1
-0
docs/cmds.rst
docs/cmds.rst
+11
-0
glances/amps/glances_amp.py
glances/amps/glances_amp.py
+9
-0
glances/amps/glances_nginx.py
glances/amps/glances_nginx.py
+21
-13
glances/main.py
glances/main.py
+4
-0
glances/outputs/glances_curses.py
glances/outputs/glances_curses.py
+3
-0
glances/plugins/glances_amps.py
glances/plugins/glances_amps.py
+1
-1
glances/plugins/glances_monitor.py
glances/plugins/glances_monitor.py
+1
-1
未找到文件。
NEWS
浏览文件 @
e57eef14
...
...
@@ -7,6 +7,7 @@ Version 2.7
Enhancements and new features:
* Add Application Monitoring Process plugin (issue #780)
* Improve IP plugin to display public IP address (issue #646)
* CPU additionnal stats monitoring: Context switch, Interrupts... (issue #810)
* [Folders] Differentiate permission issue and non-existence of a directory (issue #828)
...
...
docs/_static/amps.png
0 → 100644
浏览文件 @
e57eef14
55.6 KB
docs/aoa/index.rst
浏览文件 @
e57eef14
...
...
@@ -32,6 +32,7 @@ Legend:
sensors
ps
monitor
amps
logs
docker
actions
docs/cmds.rst
浏览文件 @
e57eef14
...
...
@@ -95,6 +95,14 @@ Command-Line Options
disable process module
.. option:: --disable-monitor
disable monitoring process list module
.. option:: --disable-amp
disable application monitoring process module
.. option:: --disable-log
disable log module
...
...
@@ -291,6 +299,9 @@ The following commands (key pressed) are supported while in Glances:
- If CPU iowait ``>60%``, sort processes by I/O read and write
``A``
Enable/disable Application Monitoring Process
``b``
Switch between bit/s or Byte/s for network I/O
...
...
glances/amps/glances_amp.py
浏览文件 @
e57eef14
...
...
@@ -21,6 +21,15 @@
I am your father...
...for all Glances Application Monitoring Processes (AMP).
AMP (Application Monitoring Process)
A Glances AMP is a Python script called (every *refresh* seconds) if:
- the AMP is *enabled* in the Glances configuration file
- a process is running (match the *regex* define in the configuration file)
The script should define a Amp (GlancesAmp) class with, at least, an update method.
The update method should call the set_result method to set the AMP return string.
The return string is a string with one or more line (
\n
between lines).
If the *one_line* var is true then the AMP will be displayed in one line.
"""
from
glances.compat
import
u
...
...
glances/amps/glances_nginx.py
浏览文件 @
e57eef14
...
...
@@ -17,24 +17,32 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
AMP (Application Monitoring Process)
A Glances AMP is a Python script called (every *refresh* seconds) if:
- the AMP is *enabled* in the Glances configuration file
- a process is running (match the *regex* define in the configuration file)
The script should define a Amp (GlancesAmp) class with, at least, an update method.
The update method should call the set_result method to set the AMP return string.
The return string is a string with one or more line (
\n
between lines).
If the *one_line* var is true then the AMP will be displayed in one line.
"""
"""
Nginx AMP
=========
Monitor the Nginx process using the status page
Monitor the Nginx process using the status page.
How to read the stats
---------------------
Active connections – Number of all open connections. This doesn’t mean number of users.
A single user, for a single pageview can open many concurrent connections to your server.
Server accepts handled requests – This shows three values.
First is total accepted connections.
Second is total handled connections. Usually first 2 values are same.
Third value is number of and handles requests. This is usually greater than second value.
Dividing third-value by second-one will give you number of requests per connection handled
by Nginx. In above example, 10993/7368, 1.49 requests per connections.
Reading – nginx reads request header
Writing – nginx reads request body, processes request, or writes response to a client
Waiting – keep-alive connections, actually it is active – (reading + writing).
This value depends on keepalive-timeout. Do not confuse non-zero waiting value for poor
performance. It can be ignored.
Source (https://easyengine.io/tutorials/nginx/status-page/)
Configuration file example:
Configuration file example
--------------------------
[nginx]
# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
...
...
glances/main.py
浏览文件 @
e57eef14
...
...
@@ -138,6 +138,10 @@ Start the client browser (browser mode):\n\
help
=
'disable network, disk I/O, FS and sensors modules'
)
parser
.
add_argument
(
'--disable-process'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'disable_process'
,
help
=
'disable process module'
)
parser
.
add_argument
(
'--disable-monitoring'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'disable_monitor'
,
help
=
'disable monitoring list module'
)
parser
.
add_argument
(
'--disable-amp'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'disable_amp'
,
help
=
'disable applications monitoring process (AMP) module'
)
parser
.
add_argument
(
'--disable-log'
,
action
=
'store_true'
,
default
=
False
,
dest
=
'disable_log'
,
help
=
'disable log module'
)
parser
.
add_argument
(
'--disable-bold'
,
action
=
'store_true'
,
default
=
False
,
...
...
glances/outputs/glances_curses.py
浏览文件 @
e57eef14
...
...
@@ -328,6 +328,9 @@ class _GlancesCurses(object):
# 'a' > Sort processes automatically and reset to 'cpu_percent'
glances_processes
.
auto_sort
=
True
glances_processes
.
sort_key
=
'cpu_percent'
elif
self
.
pressedkey
==
ord
(
'A'
):
# 'A' > enable/disable AMP module
self
.
args
.
disable_amp
=
not
self
.
args
.
disable_amp
elif
self
.
pressedkey
==
ord
(
'b'
):
# 'b' > Switch between bit/s and Byte/s for network IO
self
.
args
.
byte
=
not
self
.
args
.
byte
...
...
glances/plugins/glances_amps.py
浏览文件 @
e57eef14
...
...
@@ -73,7 +73,7 @@ class Plugin(GlancesPlugin):
# Only process if stats exist and display plugin enable...
ret
=
[]
if
not
self
.
stats
or
args
.
disable_process
:
if
not
self
.
stats
or
args
.
disable_process
or
args
.
disable_amp
:
return
ret
# Build the string message
...
...
glances/plugins/glances_monitor.py
浏览文件 @
e57eef14
...
...
@@ -88,7 +88,7 @@ class Plugin(GlancesPlugin):
ret
=
[]
# Only process if stats exist and display plugin enable...
if
not
self
.
stats
or
args
.
disable_process
:
if
not
self
.
stats
or
args
.
disable_process
or
args
.
disable_monitor
:
return
ret
# Build the string message
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录