Enhancement Request - Parse Large Relevance

Is there any way to assist us console users into parsing large relevance?

It took some time to parse the relevance (Fixlet 1600825/Rel5) into chunks to get it into a batch file with 194 “reg query” statements. We were trying to figure out which statement was proving TRUE.

The Graphical Breakdown tab is OK but with long relevance, my monitor is not big enough to display usable information. I cannot utilize the indent feature in Fixlet Debugger (v9) for some reason. FD8 crashed on me when attempting to use the Graphical Breakdown tab.

Any help with this is appreciated.

Jim Donlin

2 Likes

Adding your RFE link for reference and visibility :smile:

https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=83721

3 Likes

Can you provide the relevance here?

Sure. This is just one example. I’ve already parsed it to reg queries for my purposes. There are larger relevance out there.MS15094.pdf (21.1 KB)

So are you saying you want to be able to parse that long relevance into smaller pieces? Or are you saying that pdf is the result after it is parsed?

You can paste a long relevance into the forum directly and I can fix it after if the forum makes it look wrong.

I really need to know what is the starting state and what is the resulting state once parsed to understand what you are trying to achieve. Also include the names of fixlets and the relevance # of where to find the example in the console.

I can see where this would be useful, and also where it would be difficult to implement outside of accessing the relevance evaluator source code. Basically something like the old “Windows Script Debugger” for Relevance evaluation, that would either allow us to step through each bit of evaluation and see the result from each clause separately.

The Relevance given in that PDF, when fed to the Fixlet Debugger in “Single Clause Mode”, then indented, expands to 1,557 lines. It begins with an if…then…else construct; it would be nice to have an automated way to see the result of that “if” evaluation easily.

I realize that we can feed it into the Fixlet Debugger and deconstruct manually, and in fact I frequently do so when I need to determine why I’m getting a false-positive on the builtin content; but it’s tedious to do that later in the evaluation where we’re comparing a hundred or so variations on

 (((exists keys ("Microsoft-Windows-ImageBasedSetup-IE-Package-Base-Downlevel~31bf3856ad364e35~x86~~ 6.3.9600.16428") whose ((it = 7 OR it = 112) of (value "CurrentState" of it as integer)) of it) of item 0 of it AND (exists key "x86_microsoft-windows-s..-downlevel.binaries_31bf3856ad364e35_none_f01495e32e766ee3 " whose (exists key (if (exists default value of it) then default value of it as string else "6.3") whose ((it >= "6.3.9600" AND it < "6.3.9600.18015") of (default value of it as string as version)) of it) of it) of item 1 of it OR (exists keys ("Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~x86~~11.2.960 0.16428") whose ((it = 7 OR it = 112) of (value "CurrentState" of it as integer)) of it) of item 0 of it AND (exists key "x86_microsoft-windows-i..etexplorer-optional_31bf3856ad364e35_none_0179e7da91c36af6 " whose (exists key (if (exists default value of it) then default value of it as string else "11.2") whose ((it >= "11.2.9600" AND it < "11.2.9600.18015") of (default value of it as string as version)) of it) of it) of item 1 of it OR (exists keys ("Microsoft-Windows-InternetExplorer-VistaPlus-Update~31bf3856ad364e35~x86~~11.2.960 0.16428") whose ((it = 7 OR it = 112) of (value "CurrentState" of it as integer)) of it) of item 0 of it 

…splitting that out requires both copy/pasting of the clause itself, as well as figuring out where item 0 of it and item 1 of it refer, fixing the parentheses for our new single clauses, etc.

It would be handy to have some kind of Fixlet debugger plugin to do what I’d do manually, which would give something like

  //IF condition 1
q: exists key "ApplicabilityEvaluationCache\Package_for_KB3087038~31bf3856ad364e35~x86~~11.2.1.0" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" of native registry
A: False
T: 0.060 ms

//THEN clause 1
q: (set of (7;112) contains item 0 of it AND set of (0;2;4;32;64) contains item 1 of it) of (value "ApplicabilityState" of it as string as integer, value "CurrentState" of it as string as integer) of key "ApplicabilityEvaluationCache\Package_for_KB3087038~31bf3856ad364e35~x86~~11.2.1.0" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" of native registry
E: Singular expression refers to nonexistent object.

//THEN clause 1.1
q: (value "ApplicabilityState" of it as string as integer, value "CurrentState" of it as string as integer) of key "ApplicabilityEvaluationCache\Package_for_KB3087038~31bf3856ad364e35~x86~~11.2.1.0" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" of native registry
E: Singular expression refers to nonexistent object.

// THEN clause 1.1.1
q: key "ApplicabilityEvaluationCache\Package_for_KB3087038~31bf3856ad364e35~x86~~11.2.1.0" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" of native registry
E: Singular expression refers to nonexistent object.

// THEN clause 1.1.1.1
q: key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" of native registry
A: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing
T: 0.053 ms

// ELSE clause 1
// ( evaluate the entire ELSE here)

// ELSE clause 1.1
// (first component of ELSE clause; not a simple copy/paste because we have to scroll 1500 lines to find where item 0 and item 1 come from, and those have to be repeated for the next hundred or so pieces of the "ELSE" clause..

q: ((exists keys ("Microsoft-Windows-ImageBasedSetup-IE-Package-Base-Downlevel~31bf3856ad364e35~x86~~ 6.3.9600.16428") whose ((it = 7 OR it = 112) of (value "CurrentState" of it as integer)) of it) of item 0 of it) of (key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" of it, key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners" of it) of native registry
A: False
T: 0.106 ms

The Relevance evaluator has to be doing this anyway so the logic for parsing must exist; it’s a matter of breaking down and showing each atomic relevance clause independently.

This first cycle of “else” can of course be broken down further for debugging -

// ELSE clause 1.1.1 (removed "exists" to display any matching keys
q: ((keys ("Microsoft-Windows-ImageBasedSetup-IE-Package-Base-Downlevel~31bf3856ad364e35~x86~~ 6.3.9600.16428") whose ((it = 7 OR it = 112) of (value "CurrentState" of it as integer)) of it) of item 0 of it) of (key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" of it, key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners" of it) of native registry
T: 0.091 ms

// ELSE clause 1.1.1.1 (removed "whose" filter from keys
q: ((keys ("Microsoft-Windows-ImageBasedSetup-IE-Package-Base-Downlevel~31bf3856ad364e35~x86~~ 6.3.9600.16428")of it) of item 0 of it) of (key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" of it, key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners" of it) of native registry
T: 0.111 ms
3 Likes

James,

The starting state is the PDF. This is relevance 6 for fixlet 1509401. This situation of large relevance could be for any fixlet. (See relevance 6 for fixlet 1513215)

My immediate goal was to find out what instance of relevance 6 for fixlet 1509401 was coming back TRUE.

I have already parsed relevance 6 for fixlet 1509401 into the registry queries I needed. I copy & paste to WORD and do many text replacements.

I was hoping that there was a tool that could assist.

Jim Donlin

Thanks Jason. I concur. Although the occurrence is infrequent, it is a long time commitment to parse thru.

Because we do not have a remote relevance tool and most times we do not have access to the device at the time, I parse into DOS registry queries, run the CMD file remote and output to a local log file.

Jim Donlin

I agree, this would be highly useful. I’d love to use this when trying to ferret out why fixlets evaluate as not relevant while MS Update insists the machine needs them.

If QNA had a non-interactive CLI input mode, with clause-based reporting, that’d be darned swell.

(Upvoting the RFE…)

-Andrew

Thanks for the clarification. If possible, It would be better to have the raw relevance dumped directly into a forum post and wrapped in a code block. I can wrap it in a code block after the fact for you. I’d rather not have to reference a PDF to come up with the answer.

Be very careful using WORD for anything related to relevance or code in general. It can cause all kinds of headaches by introducing odd characters, formatting, whitespace, and many other problems.

I would strongly recommend using something like Sublime Text or NotePad++ instead.

The WebUI will have a remote relevance tool in the next release.

Also, you can create an analysis and put the relevance in a property to do remote relevance, then delete the property when you are finished. This is how I have been primarily doing remote relevance for many many years.

I need to know how you want things to look once parsed, or a better idea of what the end goal is inorder to really know what needs to happen technically in order to break apart the relevance the way you want. So far only @JasonWalker has given an example of what this might look like when parsed apart and evaluated separately.

So far, from what I can get from what @JasonWalker did is that it would be nice to have all of the clauses inside the IF statements evaluated separately to see where issues are, including the IF conditional.

This RFE would be real nice to have as I am also had situations where I have needed this. Right now I am trying to work with a Solaris Critical Patch Update that should not be relevant to the system but is reporting that it is.

The qna/xqna for Solaris (unix in general) does not work that well as I cannot import large relevance statements. Even if I could, I would still need to be able to break it apart to find the particular package that is missing.

Anyway, I see there was an update to the RFE on Sept 27 and I added my vote, so hopefully we see something.

Specific to Solaris (and other Linux/Unix platforms), the QnA tool has limitations on the buffer size when using the user input mode.

One way around it is to run it from a file

  1. Create a text file (e.g. /tmp/rel.qna) with the relevance as the content and adding Q: in front of the line.
  2. Run the QnA tool like so: sudo /opt/BESClient/bin/qna /tmp/rel.qna

Hint: You can put multiple relevance queries in the same file

Q: version of client
Q: name of operating system
2 Likes

So this also brings back the fun question…

The Solaris limitation allows for recall and command history based on the command processor in place (like the Mac client can do)

The other platforms could be switched to allow the same thing, but would again have the command line length limited by the platform like Solaris has, but as pointed out you can always get around this by using a file.

So would people prefer the extra user capabilities of command line recall and editing over large line length or?

1 Like

I definitely appreciate the ability to do recall and editing on any platform. I think this is the more common use case.