mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-02 06:27:55 +03:00
Merge branch 'issue1606' into develop
This commit is contained in:
commit
d19f9c002e
@ -37,10 +37,17 @@ system:
|
|||||||
|
|
||||||
Also, you can hide mount points as well (in the following ``/boot``):
|
Also, you can hide mount points as well (in the following ``/boot``):
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[fs]
|
||||||
|
hide=/boot.*
|
||||||
|
Filtering can also be done on device name (Glances 3.1.4 or higher):
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[fs]
|
[fs]
|
||||||
hide=/boot.*
|
hide=/dev/sdb2
|
||||||
|
|
||||||
RAID
|
RAID
|
||||||
----
|
----
|
||||||
|
@ -114,7 +114,8 @@ class Plugin(GlancesPlugin):
|
|||||||
# Loop over fs
|
# Loop over fs
|
||||||
for fs in fs_stat:
|
for fs in fs_stat:
|
||||||
# Do not take hidden file system into account
|
# Do not take hidden file system into account
|
||||||
if self.is_hide(fs.mountpoint):
|
# Also check device name (see issue #1606)
|
||||||
|
if self.is_hide(fs.mountpoint) or self.is_hide(fs.device):
|
||||||
continue
|
continue
|
||||||
# Grab the disk usage
|
# Grab the disk usage
|
||||||
try:
|
try:
|
||||||
@ -163,7 +164,11 @@ class Plugin(GlancesPlugin):
|
|||||||
'used': used,
|
'used': used,
|
||||||
'percent': percent,
|
'percent': percent,
|
||||||
'key': self.get_key()}
|
'key': self.get_key()}
|
||||||
stats.append(fs_current)
|
# Do not take hidden file system into account
|
||||||
|
if self.is_hide(fs_current['mnt_point']):
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
stats.append(fs_current)
|
||||||
else:
|
else:
|
||||||
# Default behavior
|
# Default behavior
|
||||||
for fs in fs_stat:
|
for fs in fs_stat:
|
||||||
@ -174,7 +179,11 @@ class Plugin(GlancesPlugin):
|
|||||||
'used': int(fs_stat[fs]['used']) * 1024,
|
'used': int(fs_stat[fs]['used']) * 1024,
|
||||||
'percent': float(fs_stat[fs]['percent']),
|
'percent': float(fs_stat[fs]['percent']),
|
||||||
'key': self.get_key()}
|
'key': self.get_key()}
|
||||||
stats.append(fs_current)
|
# Do not take hidden file system into account
|
||||||
|
if self.is_hide(fs_current['mnt_point']) or self.is_hide(fs_current['device_name']):
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
stats.append(fs_current)
|
||||||
|
|
||||||
# Update the stats
|
# Update the stats
|
||||||
self.stats = stats
|
self.stats = stats
|
||||||
|
Loading…
Reference in New Issue
Block a user