Skip to content
Permalink
Browse files

#1940 FIX ps: Fixed a rare crash on malformed agent output

Sometimes the windows agent reported process lines without a process name, like<br>
<tt>(\\ZAOE\Grotest,149572,25184,0,20348,7752,7656250,12500000,241,5)</tt><br>
The ps check crashed because it couldn't handle this type of line
  • Loading branch information
Andreas Boesl
Andreas Boesl committed Feb 10, 2015
1 parent 4d9e2ca commit 71522df8b28406acc1d9f0a08c966a68b9780fe6
Showing with 17 additions and 0 deletions.
  1. +12 −0 .werks/1940
  2. +1 −0 ChangeLog
  3. +4 −0 checks/ps
@@ -0,0 +1,12 @@
Title: ps: Fixed a rare crash on malformed agent output
Level: 1
Component: checks
Compatible: compat
Version: 1.2.7i1
Date: 1423577273
Class: fix

Sometimes the windows agent reported process lines without a process name, like<br>
<tt>(\\ZAOE\Grotest,149572,25184,0,20348,7752,7656250,12500000,241,5)</tt><br>
The ps check crashed because it couldn't handle this type of line

@@ -155,6 +155,7 @@
* 1960 FIX: akcp_sensor_drycontact: Service description prefix changed from "Device" to "Dry Contact"...
NOTE: Please refer to the migration notes!
* 1938 FIX: docsis_channels_upstream: fixed missing checks if channels had the same ChannelId...
* 1940 FIX: ps: Fixed a rare crash on malformed agent output...

Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
@@ -102,6 +102,10 @@ def ps_parse_info(info):
use_wmic_info = False
if not use_wmic_info:
# We need to determine the number of cpu_cores without the wmic_info
if len(line) < 3:
# On some rare instances the name of the process is missing
# This line will be igored
continue
if line[2].lower() == "system idle process":
cpu_cores = int(line[1][1:-1].split(",")[9])
ps_result.append(line)

0 comments on commit 71522df

Please sign in to comment.
You can’t perform that action at this time.