Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
2e3f4565
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,发现更多精彩内容 >>
提交
2e3f4565
编写于
10月 30, 2016
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'issue947' into develop
上级
6eb21d74
540e840b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
4 deletion
+14
-4
NEWS
NEWS
+1
-0
docs/aoa/irq.rst
docs/aoa/irq.rst
+2
-0
docs/man/glances.1
docs/man/glances.1
+1
-1
glances/plugins/glances_irq.py
glances/plugins/glances_irq.py
+10
-3
未找到文件。
NEWS
浏览文件 @
2e3f4565
...
...
@@ -28,6 +28,7 @@ Bugs corrected:
* Glances RAID plugin Traceback (issue #927)
* Default AMP crashes when 'command' given (issue #933)
* Default AMP ignores `enable` setting (issue #932)
* /proc/interrupts not found in an OpenVZ container (issue #947)
Version 2.7.1
=============
...
...
docs/aoa/irq.rst
浏览文件 @
2e3f4565
...
...
@@ -8,6 +8,8 @@ IRQ
Glances displays the top 5 interrupts rate. This plugin is only available on
GNU/Linux machine (stats are grabbed from the /proc/interrupts file).
Note: /proc/interrupts file did not exist inside OpenVZ containers.
How to read the informations:
* The first Column is the IRQ number / name
...
...
docs/man/glances.1
浏览文件 @
2e3f4565
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "Oct
22
, 2016" "2.8_DEVELOP" "Glances"
.TH "GLANCES" "1" "Oct
30
, 2016" "2.8_DEVELOP" "Glances"
.SH NAME
glances \- An eye on your system
.
...
...
glances/plugins/glances_irq.py
浏览文件 @
2e3f4565
...
...
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
# Copyright (C) 201
5
Angelo Poerio <angelo.poerio@gmail.com>
# Copyright (C) 201
6
Angelo Poerio <angelo.poerio@gmail.com>
#
# Glances is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
...
...
@@ -19,7 +19,9 @@
"""IRQ plugin."""
import
os
import
operator
from
glances.globals
import
LINUX
from
glances.timer
import
getTimeSinceLastUpdate
from
glances.plugins.glances_plugin
import
GlancesPlugin
...
...
@@ -32,6 +34,8 @@ class Plugin(GlancesPlugin):
stats is a list
"""
IRQ_FILE
=
'/proc/interrupts'
def
__init__
(
self
,
args
=
None
):
"""Init the plugin."""
super
(
Plugin
,
self
).
__init__
(
args
=
args
)
...
...
@@ -63,11 +67,14 @@ class Plugin(GlancesPlugin):
self
.
reset
()
# IRQ plugin only available on GNU/Linux
if
not
LINUX
or
(
self
.
args
is
not
None
and
self
.
args
.
disable_irq
):
# Correct issue #947: IRQ file do not exist on OpenVZ container
if
not
LINUX
\
or
(
self
.
args
is
not
None
and
self
.
args
.
disable_irq
)
\
or
not
os
.
path
.
exists
(
self
.
IRQ_FILE
):
return
self
.
stats
if
self
.
input_method
==
'local'
:
with
open
(
'/proc/interrupts'
)
as
irq_proc
:
with
open
(
self
.
IRQ_FILE
)
as
irq_proc
:
time_since_update
=
getTimeSinceLastUpdate
(
'irq'
)
irq_proc
.
readline
()
# skip header line
for
irq_line
in
irq_proc
.
readlines
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录