View | Details | Raw Unified | Return to bug 235475 | Differences between
and this patch

Collapse All | Expand All

(-)check_smartmon (-3 / +8 lines)
Lines 161-169 Link Here
161
                lines = healthMessage.split("\n")
161
                lines = healthMessage.split("\n")
162
                getNext = 0
162
                getNext = 0
163
                for line in lines:
163
                for line in lines:
164
                        vprint(3, "parseOutput: line is: '%s'" % line)
164
                        if getNext:
165
                        if getNext:
165
                                statusLine = line
166
                                if line <> "SMART STATUS RETURN: incomplete response, ATA output registers missing" and \
166
                                break
167
                                   line <> "SMART Status not supported: Incomplete response, ATA output registers missing" :
168
                                        statusLine = line
169
                                        break
167
                        elif line == "=== START OF READ SMART DATA SECTION ===":
170
                        elif line == "=== START OF READ SMART DATA SECTION ===":
168
                                getNext = 1
171
                                getNext = 1
169
                        # fi
172
                        # fi
Lines 181-187 Link Here
181
                        parts = line.split()
184
                        parts = line.split()
182
                        if len(parts):
185
                        if len(parts):
183
                                # 194 is the temperature value id
186
                                # 194 is the temperature value id
184
                                if parts[0] == "194":
187
                                if parts[0] == "194" or parts[0] == "190":
185
                                        temperature = int(parts[9])
188
                                        temperature = int(parts[9])
186
                                        break
189
                                        break
187
                                # fi
190
                                # fi
Lines 225-230 Link Here
225
228
226
        # this is absolutely critical!
229
        # this is absolutely critical!
227
        if healthStatus not in [ "PASSED", "OK" ]:
230
        if healthStatus not in [ "PASSED", "OK" ]:
231
                vprint(2, "Health status: %s" % healthStatus)
228
                return (2, "CRITICAL: device does not pass health status")
232
                return (2, "CRITICAL: device does not pass health status")
229
        # fi
233
        # fi
230
234
Lines 287-292 Link Here
287
        # check device type, ATA is default
291
        # check device type, ATA is default
288
        vprint(2, "Get device type")
292
        vprint(2, "Get device type")
289
        devtype = options.devtype
293
        devtype = options.devtype
294
        vprint(2, "command line supplied device type is: %s" % devtype)
290
        if not devtype:
295
        if not devtype:
291
                if device_re.search( device ):
296
                if device_re.search( device ):
292
                        devtype = "scsi"
297
                        devtype = "scsi"

Return to bug 235475