If AMD processor do some action

(imported topic written by Showboat)

Hi, i am trying to create a relevancy expression that will perform some actions if the processor is AMD.

I cannot figure it out, so far i have this:

(unique values of (string values of selects “Description from Win32_Processor” of wmi) as lowercase starts with “amd”)

(unique values of (string values of selects “Description from Win32_Processor” of wmi) this will return AMD,so in my opinion adding the last bit should equate to true! Bigfix does not agree!

Because i am using plurals, it seems to fail… If there is an easy way to do this i would appreciate some help.

Thanks

(imported comment written by gearoid)

Hi

Have you tried the processor object inspectors ?

http://support.bigfix.com/inspectors/System%20Objects_Any.html#processor

Q: properties of type “processor”

A: vendor name of : string

A: type of : integer

A: family of : integer

A: extended family of : integer

A: model of : integer

A: extended model of : integer

A: stepping of : integer

A: feature mask of : integer

A: extended feature mask of : integer

A: speed of : hertz

A: brand id of : integer

A: family name of : string

A: brand string of : string

A: model name of : string

T: 4.934 ms

I: plural property

I’ve two Intel processors in this Win VM.

Q: (vendor name of it contains “Intel”) of processors

A: True

A: True

T: 0.219 ms

I: plural boolean

(imported comment written by gearoid)

And you could use something like:

Q: exists processor whose (vendor name of it contains “Intel”)

A: True

T: 0.082 ms

I: singular boolean

(imported comment written by Showboat)

Thanks for the reply, but im not sure i understand what you are saying, i dont fully understand the complexities of the bigfix language.

(vendor name of it contains “AMD”) of main processor will return True

I want to add this into an action, so if it is an AMD processor it runs a specific installer otherwise it runs another installer.

So i would anticpate it looking like this:

if ((vendor name of it contains “AMD”) of main processor)

actions

else

actions

But it doesn’t work :frowning:

(imported comment written by gearoid)

When you’re using relevance within the fixlet’s actionscript you need to put it inside {} braces.

Have a look at the actions of the fixlets and tasks in the BES Support site for plenty of examples, like:

Fixlet ID 1807: Upgraded Red Hat Enterpise Linux Client …

In your case you’ll need something like:

if {(vendor name of it contains “AMD”) of main processor}

// do this

else

// do that

endif

(imported comment written by Showboat)

That’s it!

Thanks for the tip. {} all the way, working now :slight_smile:

(imported comment written by jgstew)

The following analyses have relevance examples that query a lot of different information about the CPU and the rest of the system which are related to the above question.

http://bigfix.me/analysis/details/2994563

http://bigfix.me/analysis/details/2994710

http://bigfix.me/analysis/details/2994710

http://bigfix.me/analysis/details/2994601