Module: check_mk
Branch: master
Commit: 505f5ab87ee1a65ae3c244f706f6cd19257fb2f0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=505f5ab87ee1a6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 19 16:26:53 2013 +0100
FIX: diskstat: fix local variable ios_per_sec
---
ChangeLog | 3 ++-
checks/diskstat.include | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3408605..8db35ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,7 +37,8 @@
* Linux agent: limit netstat to 10 seconds
* ps: Allow %1, %2, .. instead of %s in process_inventory. That allows
reordering of matched groups
- * mysql: fixed crash on computing IO information
+ * FIX: mysql: fixed crash on computing IO information
+ * FIX: diskstat: fix local variable 'ios_per_sec' referenced before
assignment
BI:
* FIX: fixed invalid links to hosts and services in BI tree view
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 758f04f..aac8092 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -131,6 +131,7 @@ def check_diskstat_line(this_time, item, params, line):
perfdata = [ perfdata[0], perfdata[2], perfdata[1], perfdata[3] ]
# Process IOs when available
+ ios_per_sec = None
if len(line) >= 5 and line[3] >= 0 and line[4] > 0:
reads, writes = map(int, line[3:5])
ios = reads + writes