Detection of component operating state by computer
First Claim
1. A method in a computer system for detecting an operating state of a component in the computer system comprising a plurality of components, the method comprising:
- transmitting a command line interface (CLI) command via a command line interface to the component;
receiving an output character string from the component responsive to the CLI command;
dissecting a set of significant character substrings from the output character string, wherein each significant character substring comprises a label character string indicating a meaning of the output character string and a data character string expressing data of the output character string;
setting a regular expression corresponding to each significant character substring of the set of significant character substrings thereby forming a set of regular expressions;
calculating a difference between each regular expression of the set of regular expressions and each significant character substring corresponding to the regular expression as a character string distance thereby forming a set of calculated character string distances;
comparing each calculated character string distance in the set of calculated character string distances to a set of corresponding predetermined thresholds, wherein comparing each calculated character string distance to the set of corresponding predetermined thresholds comprises;
setting a first value i to 1 and a second value S to 0, wherein the first value i identities a particular calculated character string distance in the set of calculated character string distances associated with an ith significant character substring being analyzed and wherein S identifies a sum of the calculated character string distance times a weighting coefficient W(i) for the ith significant character substring;
determining whether the first value i is less than or equal to a total number N of the set of significant character substrings;
responsive to the first value i being less than or equal to the total number N, determining whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a strict threshold T2;
responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the strict threshold T2, either logging a result or displaying a warning, and ending the comparison of each calculated character string distance to the set of corresponding predetermined thresholds;
responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the strict threshold T2, determining whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a loose threshold T1;
responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the loose threshold T1, either logging a result or displaying a warning, setting the second value S to the second value S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increasing the first value i by 1, and repeating the process for the next calculated character string distance;
responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the loose threshold T1, setting the second value S to S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increasing the first value i by 1, and repeating the process for the next calculated character string distance;
responsive to the first value i being greater than the total number N, determining whether the second value S is greater than or equal to an overall threshold T3;
responsive to the second value S being greater than or equal to the overall threshold T3, either logging a result or displaying a warning, and ending the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and
responsive to the second value S being less than the overall threshold T3, ending the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and
outputting the operating state of the component based on results of the comparison.
1 Assignment
0 Petitions
Accused Products
Abstract
A mechanism is provided for detecting an operating state of a component. A CLI command is transmitted via a command line interface to the component. An output character string is received responsive to the CLI command. A set of significant character substrings is dissected from the output character string, where each significant character substring comprises a label character string indicating a meaning of the output character string and a data character string expressing data of the output character string. A regular expression corresponding to each significant character substring is set thereby forming a set of regular expressions. A difference is calculated between each of the set regular expressions and each significant character substring corresponding to the regular expression as a character string distance. Each calculated character string distance is compared to a corresponding predetermined threshold and the operating state of the component is output based on results of the comparison.
18 Citations
18 Claims
-
1. A method in a computer system for detecting an operating state of a component in the computer system comprising a plurality of components, the method comprising:
-
transmitting a command line interface (CLI) command via a command line interface to the component; receiving an output character string from the component responsive to the CLI command; dissecting a set of significant character substrings from the output character string, wherein each significant character substring comprises a label character string indicating a meaning of the output character string and a data character string expressing data of the output character string; setting a regular expression corresponding to each significant character substring of the set of significant character substrings thereby forming a set of regular expressions; calculating a difference between each regular expression of the set of regular expressions and each significant character substring corresponding to the regular expression as a character string distance thereby forming a set of calculated character string distances; comparing each calculated character string distance in the set of calculated character string distances to a set of corresponding predetermined thresholds, wherein comparing each calculated character string distance to the set of corresponding predetermined thresholds comprises; setting a first value i to 1 and a second value S to 0, wherein the first value i identities a particular calculated character string distance in the set of calculated character string distances associated with an ith significant character substring being analyzed and wherein S identifies a sum of the calculated character string distance times a weighting coefficient W(i) for the ith significant character substring; determining whether the first value i is less than or equal to a total number N of the set of significant character substrings; responsive to the first value i being less than or equal to the total number N, determining whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a strict threshold T2; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the strict threshold T2, either logging a result or displaying a warning, and ending the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the strict threshold T2, determining whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a loose threshold T1; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the loose threshold T1, either logging a result or displaying a warning, setting the second value S to the second value S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increasing the first value i by 1, and repeating the process for the next calculated character string distance; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the loose threshold T1, setting the second value S to S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increasing the first value i by 1, and repeating the process for the next calculated character string distance; responsive to the first value i being greater than the total number N, determining whether the second value S is greater than or equal to an overall threshold T3; responsive to the second value S being greater than or equal to the overall threshold T3, either logging a result or displaying a warning, and ending the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and responsive to the second value S being less than the overall threshold T3, ending the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and outputting the operating state of the component based on results of the comparison. - View Dependent Claims (2, 3, 4, 5, 16)
-
-
6. A computer program product, for detecting an operating state of a component in a computer system, comprising a non-transitory computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to:
-
transmit a command line interface (CLI) command via a command line interface to the component; receive an output character string from the component responsive to the CLI command; dissect a set of significant character substrings from the output character string, wherein each significant character substring comprises a label character string indicating a meaning of the output character string and a data character string expressing data of the output character string; set a regular expression corresponding to each significant character substring of the set of significant character substrings thereby forming a set of regular expressions; calculate a difference between each regular expression of the set of regular expressions and each significant character substring corresponding to the regular expression as a character string distance thereby forming a set of calculated character string distances; compare each calculated character string distance in the set of calculated character string distances to a set of corresponding predetermined thresholds, wherein the computer readable program to compare each calculated character string distance to the set of corresponding predetermined thresholds further causes the computing device to; set a first value i to 1 and a second value S to 0, wherein the first value i identifies a particular calculated character string distance in the set of calculated character string distances associated with an ith significant character substring being analyzed and wherein S identifies a sum of the calculated character string distance times a weighting coefficient W(i) for the ith significant character substring; determine whether the first value is less than or equal to a total number N of the set of significant character substrings; responsive to the first value i being less than or equal to the total number N, determine whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a strict threshold T2; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the strict threshold T2, either log a result or display a warning, and end the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the strict threshold T2, determine whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a loose threshold T1; responsive to the calculated character string distance times the weighting coefficient W(i) of the ith significant character substring being greater than or equal to the loose threshold T1, either log a result or display a warning, set the second value S to the second value S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increase the first value i by 1, and repeat the process for the next calculated character string distance; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the loose threshold T1, set the second value S to S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increase the first value i by 1, and repeat the process for the next calculated character string distance; responsive to the first value i being greater than the total number N, determine whether the second value S is greater than or equal to an overall threshold T3; responsive to the second value S being greater than or equal to the overall threshold T3, either log a result or display a warning, and end the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and responsive to the second value S being less than the overall threshold T3, end the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and output the operating state of the component based on results of the comparison. - View Dependent Claims (7, 8, 9, 10, 17)
-
-
11. A system comprising:
-
a processor; and a memory coupled to the processor, wherein the memory comprises instructions which, when executed by the processor, cause the processor to; transmit a command line interface (CLI) command via a command line interface to the component; receive an output character string from the component responsive to the CLI command; dissect a set of significant character substrings from the output character string, wherein each significant character substring comprises a label character string indicating a meaning of the output character string and a data character string expressing data of the output character string; set a regular expression corresponding to each significant character substring of the set of significant character substrings thereby forming a set of regular expressions; calculate a difference between each regular expression of the set of regular expressions and each significant character substring corresponding to the regular expression as a character string distance thereby forming a set of calculated character string distances; compare each calculated character string distance in the set of calculated character string distances to a set of corresponding predetermined thresholds, wherein the instructions to compare each calculated character string distance to the set of corresponding predetermined thresholds further cause the processor to; set a first value i to 1 and a second value S to 0, wherein the first value i identifies a particular calculated character string distance in the set of calculated character string distances associated with an ith significant character substring being analyzed and wherein S identifies a sum of the calculated character string distance times a weighting coefficient W(i) for the ith significant character substring; determine whether the first value i is less than or equal to a total number N of the set of significant character substrings, responsive to the first value i being less than or equal to the total number N, determine whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a strict threshold T2; responsive to the calculated character string distance tunes the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the strict threshold T2, either log a result or display a warning, and end the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the strict threshold T2, determine whether the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring is greater than or equal to a loose threshold T1; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being greater than or equal to the loose threshold T1, either log a result or display a warning, set the second value S to the second value S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring increase the first value i by 1, and repeat the process for the next calculated character string distance; responsive to the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring being less than the loose threshold T1, set the second value S to S plus the calculated character string distance times the weighting coefficient W(i) for the ith significant character substring, increase the first value i by 1, and repeat the process for the next calculated character string distance; responsive to the first value i being greater than the total number N, determine whether the second value S is greater than or equal to an overall threshold T3; responsive to the second value S being greater than or equal to the overall threshold T3, either log a result or display a warning, and end the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and responsive to the second value S being less than the overall threshold T3, end the comparison of each calculated character string distance to the set of corresponding predetermined thresholds; and output the operating state of the component based on results of the comparison. - View Dependent Claims (12, 13, 14, 15, 18)
-
Specification