Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/disk/scsi_queue | ||
|---|---|---|
| 1 | 1 |
#!/usr/bin/env python |
| 2 | 2 |
|
| 3 | 3 |
""" |
| 4 |
Munin plugin which reports queue busy-values per online SCSI
|
|
| 4 |
Munin plugin which reports queue busy-values per online SCSI |
|
| 5 | 5 |
device on Linux, as seen in /proc/scsi/sg/devices |
| 6 | 6 |
|
| 7 | 7 |
If the busy-values often reach the queue depth of the device, |
| ... | ... | |
| 11 | 11 |
Wildcard use: |
| 12 | 12 |
If your system has many SCSI-like devices, filtering may be needed |
| 13 | 13 |
to make the resulting graphs readable. |
| 14 |
If you symlink the plugin, so that it's executed as
|
|
| 14 |
If you symlink the plugin, so that it's executed as |
|
| 15 | 15 |
scsi_queue_X_through_Y |
| 16 | 16 |
then the plugin will only look at devices |
| 17 | 17 |
/dev/sdX .. /dev/sdY |
| ... | ... | |
| 27 | 27 |
|
| 28 | 28 |
# Released according to the "New BSD License" AKA the 3-clause |
| 29 | 29 |
# BSD License: |
| 30 |
# ====================================================================
|
|
| 30 |
# ==================================================================== |
|
| 31 | 31 |
# Copyright (c) 2010, Danish National Board of Health. |
| 32 | 32 |
# All rights reserved. |
| 33 | 33 |
# |
| ... | ... | |
| 52 | 52 |
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 53 | 53 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 54 | 54 |
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 55 |
# ====================================================================
|
|
| 55 |
# ==================================================================== |
|
| 56 | 56 |
|
| 57 | 57 |
# $Id: scsi_queue 13630 2010-08-31 15:29:14Z tra $ |
| 58 | 58 |
|
| ... | ... | |
| 144 | 144 |
# 2:0:0:0 |
| 145 | 145 |
# 3:0:0:0 |
| 146 | 146 |
# |
| 147 |
# The colon-separated values map to the first four parts
|
|
| 147 |
# The colon-separated values map to the first four parts |
|
| 148 | 148 |
# of /proc/scsi/sg/devices |
| 149 |
# And the directory entries are symlinks which point to directories
|
|
| 150 |
# in /sys/devices. By following a symlink, we may end up in
|
|
| 149 |
# And the directory entries are symlinks which point to directories |
|
| 150 |
# in /sys/devices. By following a symlink, we may end up in |
|
| 151 | 151 |
# a directory which contains directory entries like: |
| 152 | 152 |
# - block:sdb |
| 153 | 153 |
# ... |
| ... | ... | |
| 162 | 162 |
|
| 163 | 163 |
# Search for dirent called block:SOMETHING |
| 164 | 164 |
# Put SOMETHING into blockdev_name |
| 165 |
# Couldn't make glob.glob() work: The length of the result
|
|
| 165 |
# Couldn't make glob.glob() work: The length of the result |
|
| 166 | 166 |
# of glob() returned TypeError: len() of unsized object on |
| 167 | 167 |
# RHEL 5's python... |
| 168 | 168 |
dirents = os.listdir(sys_pathname) |
Formats disponibles : Unified diff