Add hide configuration key for FS Plugin (issue #736)

This commit is contained in:
nicolargo 2015-12-06 14:01:16 +01:00
parent f3c7db8fd4
commit e255b2a1f5
3 changed files with 8 additions and 2 deletions

1
NEWS
View File

@ -8,6 +8,7 @@ Version 2.6
Enhancements and new features: Enhancements and new features:
* New folders' monitoring plugins (issue #721) * New folders' monitoring plugins (issue #721)
* Add hide configuration key for FS Plugin (issue #736)
* Add process summary min/max stats (issue #703) * Add process summary min/max stats (issue #703)
* Add timestamp to the CSV export module (issue #708) * Add timestamp to the CSV export module (issue #708)
* Add a shortcut 'E' to delete process filter (issue #699) * Add a shortcut 'E' to delete process filter (issue #699)

View File

@ -82,7 +82,7 @@ critical=90
#wlan0_tx_critical=1000000 #wlan0_tx_critical=1000000
#wlan0_tx_log=True #wlan0_tx_log=True
#[diskio] [diskio]
# Define the list of hidden disks (comma separeted) # Define the list of hidden disks (comma separeted)
#hide=sda2,sda5 #hide=sda2,sda5
# Alias for sda1 # Alias for sda1
@ -98,6 +98,8 @@ warning=70
critical=90 critical=90
# Allow additionnals files types (comma-separated FS type) # Allow additionnals files types (comma-separated FS type)
#allow=zfs #allow=zfs
# Define the list of hidden file system (comma separeted)
#hide=/boot/efi
[folders] [folders]
# Define a folder list to monitor # Define a folder list to monitor
@ -147,7 +149,7 @@ mem_careful=50
mem_warning=70 mem_warning=70
mem_critical=90 mem_critical=90
#[monitor] [monitor]
# Define the list of processes to monitor # Define the list of processes to monitor
# *** This section is optional *** # *** This section is optional ***
# The list is composed of items (list_#nb <= 10) # The list is composed of items (list_#nb <= 10)

View File

@ -115,6 +115,9 @@ class Plugin(GlancesPlugin):
# Loop over fs # Loop over fs
for fs in fs_stat: for fs in fs_stat:
# Do not display hidden file system
if self.is_hide(fs.mountpoint):
continue
# Grab the disk usage # Grab the disk usage
try: try:
fs_usage = psutil.disk_usage(fs.mountpoint) fs_usage = psutil.disk_usage(fs.mountpoint)