File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66### more information on these values, look in the Linux kernel
77### documentation for "I/O statistics fields".
88###
9+ ### By default, the script would monitor any entry listed under
10+ ### /proc/diskstats that is not containing a number. Override it by passing
11+ ### a list of devices in the 'devices' parameter.
12+ ###
913### This script has the option of explicitly setting which devices
1014### to check using the "devices" option in your configuration. If
1115### you set this value, it will invalidate the MIN_DISK_SIZE and
5862
5963# 5 GB
6064MIN_DISK_SIZE = 5242880
61- DEVICES = ''
65+ # Set to None to trigger disk discovery under /proc/diskstats
66+ # Pass a 'devices' parameter to explicitly list disks to monitor
67+ DEVICES = None
6268IGNORE_DEV = 'dm-|loop|drbd'
6369
6470PARTITIONS_FILE = '/proc/partitions'
@@ -162,7 +168,7 @@ def get_partitions():
162168 logging .debug ('getting partitions' )
163169 global PARTITIONS
164170
165- if DEVICES != '' :
171+ if DEVICES is not None :
166172 # Explicit device list has been set
167173 logging .debug (' DEVICES has already been set' )
168174 out = DEVICES
@@ -179,7 +185,7 @@ def get_partitions():
179185 return p .returncode
180186
181187 for dev in out .split ():
182- if DEVICES != '' :
188+ if DEVICES is not None :
183189 # Explicit device list has been set
184190 PARTITIONS .append (dev )
185191 else :
You can’t perform that action at this time.
0 commit comments