Smbios uuid inspector broken in BigFix 9.5.0 or later

The value "uuid" of structures "system_information" of smbios property returns a Binary-Encoded string. In the post linked above, @etorres came up with a rather elegant method of parsing it out. EDIT - having tried in earlier versions I find this is a problem new to 9.5.x -

q: (value "uuid" of structures "system_information" of smbios as string)
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: characters of (value "uuid" of structures "system_information" of smbios as string)
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string)
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: (first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of concatenation "" of (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
E: The expression could not be evaluated: class UnrepresentableBinaryString

I see no difference in the debugger whether I use “Percent-encode results”.

  • Did this method work in earlier versions of the Debugger, or did it only work in Analysis/Relevance?
  • Is this problem new to 9.5.x?
  • Does anyone know a method to retrieve the UUID correctly (cross-platform) that works in 9.5.2?

I’m trying to build a wizard to import Bare Metal Targets en-masse, and UUID is one of the properties we can use to link a Bare Metal Target to a real machine (Serial Number, MAC Address, and IP address being other methods). I have working code for MAC and Serial Number, but between multiple MAC addresses on a host and some systems not presenting a Serial Number, I still need to retrieve UUID in some cases.

1 Like

This does appear to be a new problem in 9.5.0 and 9.5.2; it worked correctly in 9.2.7 on Windows and Linux, but does not work on either platform in 9.5.0 or 9.5.2. I’ve opened PMR 30276,004,000 on this issue.

q: version of client
A: 9.2.7.53
T: 0.417 ms
I: singular version

q: name of operating system
A: Win7
T: 0.082 ms
I: singular string

q: (value "uuid" of structures "system_information" of smbios as string)
A: %00@%af%9f&%e8%e2%11%86%e4%88Q%fbk%c8/
T: 0.127 ms
I: singular string

q: characters of (value "uuid" of structures "system_information" of smbios as string)
A: %00
A: @
A: %af
A: %9f
A: &
A: %e8
A: %e2
A: %11
A: %86
A: %e4
A: %88
A: Q
A: %fb
A: k
A: %c8
A: /
T: 0.301 ms
I: plural substring

q: (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string)
A: 00
A: 40
A: af
A: 9f
A: 26
A: e8
A: e2
A: 11
A: 86
A: e4
A: 88
A: 51
A: fb
A: 6b
A: c8
A: 2f
T: 0.355 ms
I: plural string

q: (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
A: 00
A: 40
A: AF
A: 9F
A: 26
A: E8
A: E2
A: 11
A: 86
A: E4
A: 88
A: 51
A: FB
A: 6B
A: C8
A: 2F
T: 0.252 ms
I: plural string

q: (first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of concatenation "" of (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
A: 9FAF4000-E826-11E2-86E4-8851FB6BC82F
T: 0.278 ms
I: singular string

-----

q: version of client
A: 9.5.2.56
T: 0.619 ms
I: singular version

q: name of operating system
A: Win7
T: 0.060 ms
I: singular string

q: (value "uuid" of structures "system_information" of smbios as string)
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: characters of (value "uuid" of structures "system_information" of smbios as string)
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string)
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
E: The expression could not be evaluated: class UnrepresentableBinaryString

q: (first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of concatenation "" of (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
E: The expression could not be evaluated: class UnrepresentableBinaryString

---
Q: name of operating system
A: Linux Red Hat Enterprise Server 6.7
T: 10772

Q: version of client
A: 9.2.1.48
T: 69

Q: (first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of concatenation "" of (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
A: 34333834-3834-5355-4530-33384E314732
T: 340


---
Q: version of client
A: 9.5.2.56
T: 60731

Q: name of operating system
A: Linux Red Hat Enterprise Workstation 6.7
T: 115

Q: (first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of concatenation "" of (it as hexadecimal) of characters of (value "uuid" of structures "system_information" of smbios as string) as uppercase
E: The expression could not be evaluated: 27UnrepresentableBinaryString
T: 14661

Can’t say I’ve looked at this in a while, but it looks like they added “hexadecimal of <smbios value>”… not sure if this was around when I wrote the original post. This works on my system in 9.5.2:

(first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of concatenation "" of characters of (hexadecimal of values "uuid" of structures "system_information" of smbios) as uppercase

Haven’t checked if there were any other changes that would make it easier for all platforms.

Awesome that works for me too. On Linux and on Windows. Thanks much!

I think the PMR should still be addressed, as the new method does not work on the 9.2.7 client. I’d expect the new inspectors to provide for backward-compatibility.

1 Like

A little feedback from the PMR that makes it easier to be version-independent:

Please Try the following relevence subsittuting <field name> with the   
item you are search for ( "uuid", etc)                                  
(if exists property "hexadecimal" then hexadecimal of it else it as     
string as                                                               
hexadecimal) of (value "<field name>" of structure "system_information" 
of                                                                      
smbios)                                                                 

So what I’m working with now is

((first 2 of following text of position 6 of it & first 2 of following text of position 4 of it & first 2 of following text of position 2 of it & first 2 of following text of position 0 of it & "-" & first 2 of following text of position 10 of it & first 2 of following text of position 8 of it & "-" & first 2 of following text of position 14 of it & first 2 of following text of position 12 of it & "-" & first 4 of following text of position 16 of it & "-" & following text of position 20 of it) of (if exists property "hexadecimal" then hexadecimal of it else it as string as hexadecimal) of (value "uuid" of structure "system_information" of smbios) as uppercase)

This is shorter and a little bit more readable, but I’m still checking the cross/platform and cross/version results:

(concatenation of(characters (6;7;4;5;2;3;0;1) of it;"-";characters(10;11;8;9) of it;"-";characters(14;15;12;13) of it;"-";characters(16;17;18;19) of it;"-";following text of position 20 of it)) of ((if exists property "hexadecimal" then hexadecimal of it else it as string as hexadecimal) of (value "uuid" of structure "system_information" of smbios) as uppercase)

I just hit this problem a bit ago. I noticed it is breaking my one of my SMBIOS properties.

This is easier for the basics:

(it as trimmed string as uppercase) of (it as string | hexadecimal of it) of values "uuid" of structures "system_information" of smbios

I don’t like using IF/THEN/ELSE when I don’t have to and I also like to preserver the right to left nature of relevance.

I only tested this on 9.5 so I’m not sure if (it as string | hexadecimal of it) works on 9.2 or below.


Related: Free RAM Slot for Linux

I couldn’t make it work in the 9.2.7 debugger…

q: version of client
A: 9.2.7.53
T: 0.248 ms
I: singular version

q: (it as trimmed string as uppercase) of (it as string | hexadecimal of it) of values "uuid" of structures "system_information" of smbios
E: The operator "hexadecimal" is not defined.

q: ((value "uuid" of it as string as hexadecimal) | (hexadecimal of value "uuid" of it as string))  of structures "system_information" of smbios
E: The operator "hexadecimal" is not defined.
1 Like

That is basically what I consider a bug with the way the | operator works that prevents it from working the way I feel it should.

On a 9.2 device, it shouldn’t even consider the hexadecimal inspector unless the first part fails.