Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Python bug causes Real-Time Process Explorer to Linux component monitors into Unknown state in SAM

Python bug causes Real-Time Process Explorer to Linux component monitors into Unknown state in SAM

Updated September 17, 2018

Overview

This article details a resolution to the issue that occurs in SAM in which a bug in Python causes the Real-Time Process Explorer (RTPE) to place any SAM Linux Process Monitor components into an unknown state and return the following error message:

Process Explorer Error - Empty job result received.

Environment

  • SAM 

Cause

If the user identifier (UID) of any Linux process consists only of numbers, the Python script /opt/SolarWinds/Agent/bin/Plugins/APM/process_helper.py fails with the error message:

getpwuid(): uid not found:33

 

Specifically, the bug affects the following section of Python code:

def get_user_name(cache, uid):
    if uid in cache.keys():
        return cache[uid]
   user = pwd.getpwuid(uid)[0]
   cache[uid] = user
   return user

The line user = pwd.getpwuid(uid)[0] is what is causing the Python script to fail when using a numerical UID.

Resolution

  • Modify the Python code to read:
    def get_user_name(cache, uid):
        try:
            user = pwd.getpwuid(uid)[0]
        except KeyError as name:
            user = 'root'
        return user
    
  • As a result, if a numerical UID cannot be found, the Python command instead defaults the UID to the root user ID.
 
Last modified

Tags

Classifications

Public