Shell Command Exit Status for Device Attribute Discovery

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Discovery applications face challenges in accurately obtaining attributes from computing devices due to errors generated by operating system shell functions, particularly due to permissions issues, missing functions, and varying textual error messages across different operating systems and installations, which complicates error detection and handling.

Innovation Solution

The use of numerical exit status instead of textual error messages to determine the success or failure of attribute retrieval, by executing a first command to suppress textual errors and a second command to obtain a numerical return value, allowing for consistent error handling across different environments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If textual error messages are used to indicate errors, then error information can be provided to users, but error detection and handling becomes difficult due to variability across operating systems and installations

Engineering Contradiction:
Improveerror informationVSAvoiderror handling complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent changes the parameter format of error indication from variable-length textual messages to fixed-format numerical exit status codes. This standardization eliminates the variability problem across different operating systems and installations, making error detection and handling consistent and predictable without losing essential error information.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies homogeneity by unifying the error indication mechanism across all computing devices to use numerical exit status codes rather than allowing diverse textual error messages. This creates a homogeneous error handling interface that simplifies the discovery application's logic and reduces the complexity of handling different error formats.

Inventive Principle:
Principle #33Homogeneity

2Reliability

If textual error messages are suppressed and only numerical exit status is used, then error detection becomes consistent, but error message information may be lost

Engineering Contradiction:
Improveerror detection consistencyVSAvoiderror message details
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent segments the error information into two distinct parts: numerical exit status codes for reliable error detection and classification, and optional textual error messages for detailed error description. This segmentation allows the system to use the numerical code for consistent error handling while preserving the textual message for when detailed error information is needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The numerical exit status code acts as an intermediary between the function execution and the discovery application's error handling logic. It provides a standardized, parseable interface that enables reliable error detection while the original textual error messages can still be accessed through the function's output when additional diagnostic information is required.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If discovery patterns are frequently updated to handle new error message variants, then compatibility with new operating systems is improved, but maintenance effort increases

Engineering Contradiction:
Improveoperating system compatibilityVSAvoidmaintenance time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent changes the error indication parameter from variable textual messages requiring pattern matching to standardized numerical exit status codes. This parameter change makes the discovery application inherently more adaptable to new operating systems and function implementations, as numerical codes maintain consistency across platforms and versions, eliminating the need for frequent updates to handle new error message variants.

Inventive Principle:
Principle #35Parameter changes

4Measurement precision

If numerical exit status is obtained through a separate command, then error detection accuracy improves, but the number of commands executed increases

Engineering Contradiction:
Improveerror detection accuracyVSAvoidcommand execution efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent merges the error status retrieval into the original command execution by capturing the exit status of the function call itself. Rather than requiring a separate command to obtain the error status, the discovery application can directly access the numerical exit status returned by the function, combining the attribute retrieval and error detection into a single operation.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11283681B2Enhancing discovery patterns with shell command exit status
Publication Date: 2022.03.22 SERVICENOW INC
  • US11283681B2 patent drawing
  • US11283681B2 patent drawing
  • US11283681B2 patent drawing

AI summary

A computing system includes a discovery application that identifies a computing device associated with a managed network. The application determines a first command that causes the computing device to invoke a function that provides as output attributes of the computing device. The command includes a parameter that suppresses any textual error messages that the function places in the output. The application also determines a second command that causes the computing device to provide a numerical exit status of the function. The application causes the computing device to execute the first and second commands, and obtains the output and the numerical exit status. Based on the numerical exit status, the application determines that the function did not fully obtain the attributes of the computing device and, in response, (i) modifies the first command, and (ii) causes the computing device to execute the first command as modified and the second command.