Concatinating relevance which are related to each other

(imported topic written by Darknight)

Hi,

i have belwo three relevance for displaying ip-address , ip-address type , mac addresses:

q: ((addresses

of

it

as

string)

;

(
if

(
exists

property

“ipv6 interfaces”

and

exists

network)

then

addresses

of

ipv6 interfaces

of

it

as

string

else

“”
))
of

adapters

whose
(up

of

it

AND

not

loopback

of

it

AND

address

of

it

as

string

!=

“127.0.0.1”
)

of

network

A:172.16.1.134

A:10.18.154.166

q: ((ip versions of addresses of it as string) ; (if (exists property “ipv6 interfaces” and exists network) then ip versions of addresses of ipv6 interfaces of it as string else “”))of adapters whose(up of it AND not loopback of it AND address of it as string != “127.0.0.1”) of network

A:ipv4

A:ipv4

q:if (unix of operating system) then ((name of it & ": " & mac address of it as string) of ip interfaces whose (not loopback of it AND exists mac address of it) of network) else if (windows of operating system) then (mac addresses of adapters of network) else (“N/A”)

A:00-50-56-ab-17-4e

A:00-50-56-ab-28-5b

i want to concatinate / combine these three relevance so that it can produce the below output :

172.16.1.134|ipv4|00-50-56-ab-17-4e

10.18.154.166|ipv4|00-50-56-ab-28-5b

can someone please shown me how can i do this in above case…thanks in advance.

(imported comment written by MattPeterson)

This should work:

q:

(addresses

of

it

as

string
,

((ip versions

of

addresses

of

it

as

string)

;

(
if

(
exists

property

“ipv6 interfaces”

and

exists

network)

then

ip versions

of

addresses

of

ipv6 interfaces

of

it

as

string

else

“”
))

,

mac addresses

of

it

as

string)

of

(adapters

whose
(up

of

it
)

of
network)

(imported comment written by Darknight)

thanks a trillion MattPeterson … i have tried the above relevance on the machien where ipv6 is not present where it worked fine as below :

q:
(addresses

of

it

as

string
,

((ip versions

of

addresses

of

it

as

string)

;

(
if

(
exists

property

“ipv6 interfaces”

and

exists

network)

then

ip versions

of

addresses

of

ipv6 interfaces

of

it

as

string

else

“”
))

,

mac addresses

of

it

as

string)

of

(adapters

whose
(up

of

it
)

of
network)

A:
172.16.1.134, ipv4, 00-50-56-ab-17-4e

A:
10.18.154.166, ipv4, 00-50-56-ab-28-5b

but on the machiens where ipv6 interface is available its not showing the ipv6 address but duplicating the ipv4 address as follows :

Q: (addresses of it as string, ((ip versions of addresses of it as string) ; (if (exists property “ipv6 interfaces” and exists network) then ip versions of addresses of ipv6 interfaces of it as string else “”)) , mac addresses of it as string) of (adapters whose(up of it) of network)

A: 172.16.1.139, ipv4, 00-50-56-ab-1d-7e

A: 172.16.1.139, ipv6, 00-50-56-ab-1d-7e

A: 10.18.154.171, ipv4, 00-50-56-ab-38-72

A: 10.18.154.171, ipv6, 00-50-56-ab-38-72

below is the output for relevance which i have used to generate the ipv4 and ipv6 address from machine :

((addresses of it as string) ; (if (exists property “ipv6 interfaces” and exists network) then addresses of ipv6 interfaces of it as string else “”))of adapters whose(up of it AND not loopback of it AND address of it as string != “127.0.0.1”) of network

A: 172.16.1.139

A: fe80:0:0:0:250:56ff:feab:1d7e

A: 10.18.154.171

A: fe80:0:0:0:250:56ff:feab:3872

i have modified the relevance provided by you as below:

Q: ((((addresses of it as string) ; (if (exists property “ipv6 interfaces” and exists network) then addresses of ipv6 interfaces of it as string else “”))of it),(((ip versions of addresses of it as string) ; (if (exists property “ipv6 interfaces” and exists network) then ip versions of addresses of ipv6 interfaces of it as string else “”))of it),(mac addresses of it as string )) of adapters whose(up of it AND not loopback of it AND address of it as string != “127.0.0.1”) of network

A: 172.16.1.139, ipv4, 00-50-56-ab-1d-7e

A: 172.16.1.139, ipv6, 00-50-56-ab-1d-7e

A: fe80:0:0:0:250:56ff:feab:1d7e, ipv4, 00-50-56-ab-1d-7e

A: fe80:0:0:0:250:56ff:feab:1d7e, ipv6, 00-50-56-ab-1d-7e

A: 10.18.154.171, ipv4, 00-50-56-ab-38-72

A: 10.18.154.171, ipv6, 00-50-56-ab-38-72

A: fe80:0:0:0:250:56ff:feab:3872, ipv4, 00-50-56-ab-38-72

A: fe80:0:0:0:250:56ff:feab:3872, ipv6, 00-50-56-ab-38-72

i think in above relevance i am mesing up somewhere , as you can see i am getting ipv4 as well as ipv6 addresses but its getting duplicated…

Could you please modify the releavnce provided by you so that it can display ipv4 as well as ipv6 addresses and the corresponding fileds separated by “|” …in your relevance the separator is “,” … can we replace it by “|”…

basically i am trying to get the relevance which can output below thing in both ipv4 and ipv6 case :

ip address | ip address type | mac address

(imported comment written by MattPeterson)

Try this:

((address of it as string & " | " & ((ip version of address of it as string)) & " | " & mac address of it as string) of (ipv6 interfaces of (adapters whose(up of it AND not loopback of it) of network))) ; ((address of it as string & " | " & ((ip version of address of it as string)) & " | " & mac address of it as string) of (adapters whose(up of it AND not loopback of it) of network))

(imported comment written by Darknight)

great … great…thank a lot Matt…this is working fine as per our requirement…Thanks a lot again … i have learnt new thing in relevance and this wil be really very helpful in near future for us :slight_smile:

(imported comment written by Darknight)

on the same front will it be possible to join below three relevance which are based on wmi :

q:
if

(unix

of

operating system)

then

(
“N/A”
)

else

if

((
exists

wmi)

AND

(
exists

string values

of

selects

“MediaType from win32_CDROMDrive”

of

wmi))

then

(string values

of

selects

“MediaType from win32_CDROMDrive”

of

wmi)

else

(
“N/A”
)

A:
DVD-ROM

A:
DVD-ROM

T:
27.507 ms

q:
if

(unix

of

operating system)

then

(
“N/A”
)

else

if

((
exists

wmi)

AND

(
exists

string values

of

selects

“PNPDeviceID from win32_CDROMDrive”

of

wmi))

then

(string values

of

selects

“PNPDeviceID from win32_CDROMDrive”

of

wmi)

else

(
“N/A”
)

A:
SCSI\CDROM&VEN_MAGICISO&PROD_VIRTUAL_DVD-ROM&REV_1.0A\1&2AFD7D61&0&0000

A:
IDE\CDROMNECVMWAR_VMWARE_IDE_CDR10_______________1.00____\5&3A794E10&0&1.0.0

T:
18.073 ms

q:
if

(unix

of

operating system)

then

(
“N/A”
)

else

if

((
exists

wmi)

AND

(
exists

string values

of

selects

“TransferRate from win32_CDROMDrive”

of

wmi))

then

(string values

of

selects

“TransferRate from win32_CDROMDrive”

of

wmi)

else

(
“N/A”
)

A:
-1

A:
-1

T:
25.840 ms

in order to get teh reusult such as :

DVD-ROM|SCSI\CDROM&VEN_MAGICISO&PROD_VIRTUAL_DVD-ROM&REV_1.0A\1&2AFD7D61&0&0000|-1

DVD-ROM|IDE\CDROMNECVMWAR_VMWARE_IDE_CDR10_______________1.00____\5&3A794E10&0&1.0.0|-1

(imported comment written by Darknight)

Can someone please provide a hint

(imported comment written by jgstew)

See these examples:

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

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

(imported comment written by Darknight)

thanks a ton jgstew…i took help of the examples mentioend in the link and modified my relevance to be as follows :

q:
if

(
exists

wmi)

then

(concatenation

“|”

of

((string values

of

property

“PNPDeviceID”

of

it,

string values

of

property

“TransferRate”

of

it
)

of

select objects

“PNPDeviceID, TransferRate from Win32_CDROMDrive”

of

wmi

as

string))

else

“N/A”

but this is giving me output as :

A:SCSI\CDROM&VEN_MAGICISO&PROD_VIRTUAL_DVD-ROM&REV_1.0A\1&2AFD7D61&0&0000, -1|IDE\CDROMNECVMWAR_VMWARE_IDE_CDR10_______________1.00____\5&3A794E10&0&1.0.0, -1

i want the output in the below format :

SCSI\CDROM&VEN_MAGICISO&PROD_VIRTUAL_DVD-ROM&REV_1.0A\1&2AFD7D61&0&0000|1

IDE\CDROMNECVMWAR_VMWARE_IDE_CDR10_______________1.00____\5&3A794E10&0&1.0.0|1

Could you please provide soem assistance in modifying this relevance to get this desire result…thanks a gain for the assistance :slight_smile:

(imported comment written by Darknight)

can someone please provide a hint

(imported comment written by Darknight)

Any assitance ?

(imported comment written by VitaliLukyanau)

you join multiple the rows with concatenation function

if (exists wmi) then ((string value of property “PNPDeviceID” of it & “|” & string value of property “TransferRate” of it) of select objects “PNPDeviceID, TransferRate from Win32_CDROMDrive” of wmi as string) else “N/A”

gives

SCSI\CDROM&VEN_BSLKH&PROD_9IF0L6VO1&REV_1.03\5&36E5972&0&000000|-1

IDE\CDROMOPTIARC_DVD_RW_AD-7240S_________________1.03____\5&2AFB53D3&0&0.0.0|-1

(imported comment written by Darknight)

Hi Fin…thanks a lot for teh great help … could you do one more favour and let me know how io can achive the belwo result :

what i want to achive is to combine all the below mentioned relevance in a one property to have results as mention below :

expected result :

A:GenuineIntel | 6 | | False | 9 | Xeon | Ok | 3 | 4

GenuineIntel | 6 | | False | 9 | Xeon | Ok | 3 | 4

the separate properties are as shown below:

q:/Manufacturer Name - Processor/

(if

(name

of

operating system

as

lowercase

contains

“sun”)

then

("")

else

if

(exists

dmi)

then

( processor_manufacturers

of

processor_informations

of

dmi

as

string)

else

(""))

whose

(it

does not contain

“0”)

A:GenuineIntel

A:GenuineIntel

T:0.200 ms

q:/Level_Processor/

if

(windows

of

operating system)

then(if

exists

(string values

of

selects

“Level from Win32_Processor”

of

wmi)

then

(string values

of

selects

“Level from Win32_Processor”

of

wmi)

else

(""))

else

("")

A:6

A:6

T:14.112 ms

q:/PNPDeviceID_Processor/

if

(unix

of

operating system)

then

("")

else

if

(windows

of

operating system)

then

(if

exists

(string values

of

selects

“PNPDeviceID from win32_Processor”

of

wmi)

then

(string values

of

selects

“PNPDeviceID from win32_Processor”

of

wmi)

else

(""))

else

("")

A:

T:7.996 ms

q:/PowerManagementSupported_Processor/

if

(unix

of

operating system)

then

("")

else

if

(windows

of

operating system)

then

(if

exists

(string values

of

selects

“PowerManagementSupported from win32_Processor”

of

wmi)

then

(string values

of

selects

“PowerManagementSupported from win32_Processor”

of

wmi)

else

(""))

else

("")

A:False

A:False

T:15.347 ms

q:/ProcessorArchitecture_Processor/

if

(name

of

operating system

as

lowercase

contains

“sun”)

then

(types

of

processors

as

string)

else

if

(name

of

operating system

as

lowercase

contains

“linux”)

then

(parenthesized parts

1

of

(matches (regex

“ProcessorArchitecture=(.+)”)

of

it)

of

lines

whose

(it

contains

“ProcessorArchitecture=”)

of

file

“inventory.txt”

of

folder

“__HardwareInfo”

of

client folder

of

site

whose

(name

of

it

starts with

“actionsite”))

else

if

(windows

of

operating system)

then

(if

exists

(string values

of

selects

“Architecture from win32_Processor”

of

wmi)

then

(string values

of

selects

“Architecture from win32_Processor”

of

wmi)

else

(""))

else

("")

A:9

A:9

T:14.747 ms

q:/ProcessorFamily_Processor/

family names

ofprocessors

A:Xeon

A:Xeon

T:0.043 ms

q:/ProcessorStatus_Processor/

if

(name

of

operating system

as

lowercase

contains

“sun”)

then

(states

of

processors

as

string)

else

if

(name

of

operating system

as

lowercase

contains

“linux”)

then

(if

(exists

dmi)

then

(unique values

of

statuss

of

processor_informations

of

dmi

as

string)

else

(""))

else

if

(windows

of

operating system)

then

(if

exists

(string values

of

selects

“Status from win32_Processor”

of

wmi)

then

(string values

of

selects

“Status from win32_Processor”

of

wmi

as

string)

else

(""))

else

("")

A:OK

A:OK

T:14.746 ms

q:/ProcessorType_Processor/

if

(name

of

operating system

as

lowercase

contains

“sun”)

then(type

of

processor

as

string)

else

if

(name

of

operating system

as

lowercase

contains

“linux”)

then

(parenthesized parts

1

of

(matches (regex

“Processor_Type:(.+)”)

of

it)

of

lines

whose

(it

contains

“Processor_Type:”)

of

file

“inventory.txt”

of

folder

“__HardwareInfo”

of

client folder

of

site

whose

(name

of

it

starts with

“actionsite”))

else

if

(windows

of

operating system)

then

(if

(exist

(string values

of

selects

“ProcessorType from win32_Processor”

of

wmi))

then

(string values

of

selects

“ProcessorType from win32_Processor”

of

wmi)

else

(""))

else

("")

A:3

A:3

T:14.999 ms

q:/UpgradeMethod_Processor/

if

(unix

of

operating system)

then

(if

(exists

dmi)

then

(unique values

of

processor_upgrades

of

processor_informations

of

dmi

as

string)else

(“N/A”))

else

if

(windows

of

operating system)

then

(if

(exists

(string values

of

selects

“UpgradeMethod from Win32_Processor”

of

wmi))

then

(string values

of

selects

“UpgradeMethod from Win32_Processor”

of

wmi)

else

(""))

else

("")

A:4

A:4

T:17.759 ms

as guided by you , i can combine the individual relevance if those are getting evaluated by single method that is either by wmi or by dmi or purely through relevance , but in the above case its the mixture of all and i am bit confused how i can combine thses results in a single relevance clause and get the desired output.

Please assist me.

(imported comment written by VitaliLukyanau)

don’t have enough time to try ideas, but one first

I see you have only one 1) not wmi - why ?

q: string value of selects “Manufacturer from win32_Processor” of wmi
A: GenuineIntel
T: 5.849 ms
I: singular string

this one works good

so for Windows you could create good string of values from wmi.

This idea leads to global separation of OSes

one more question - do you think that not identical (ALL properties are identical) CPU could be on the same server ?

if it is imossible then you could review all your relevances to remove uneeded “s” to make result as “singular string” for all clause

after that you could just do & of them

this part of sample beleive that CPU identical

(
if (name of operating system as lowercase contains “sun”) then ("") else if (exists dmi) then ( processor_manufacturer of processor_informations of dmi as string) else ("")) whose (it does not contain “0”)

   & " | " &
  
   (if (name of operating system as lowercase contains "sun") then(type of processor as string) else if (name of operating system as lowercase contains "linux") then (parenthesized part 1 of (matches (regex "Processor_Type:(.+)") of it) of lines whose (it contains "Processor_Type:") of file "inventory.txt" of folder "__HardwareInfo" of client folder of site whose (name of it starts with "actionsite")) else if (windows of operating system) then (if (exist (string value of select "ProcessorType from win32_Processor" of wmi)) then (string value of select "ProcessorType from win32_Processor" of wmi) else ("")) else (""))
  
   & " | " &
  
   (if (name of operating system as lowercase contains "sun") then (state of processor as string) else if (name of operating system as lowercase contains "linux") then (if (exists dmi) then (unique value of status of processor_information of dmi as string) else ("")) else if (windows of operating system) then (if exists (string value of select "Status from win32_Processor" of wmi) then (string value of select "Status from win32_Processor" of wmi as string) else ("")) else (""))

(imported comment written by Darknight)

i am getting below error since there are multiple processors available on our enviornment:

q:
(
if

(name

of

operating system

as

lowercase

contains

“sun”
)

then

(
""
)

else

if

(
exists

dmi)

then

( processor_manufacturer

of

processor_informations

of

dmi

as

string)

else

(
""
))

whose

(
it

does not contain

“0”
)
&

" | "

&
(
if

(name

of

operating system

as

lowercase

contains

“sun”
)

then
(type

of

processor

as

string)

else

if

(name

of

operating system

as

lowercase

contains

“linux”
)

then

(parenthesized part

1

of

(matches (regex

“Processor_Type:(.+)”
)

of

it
)

of

lines

whose

(
it

contains

“Processor_Type:”
)

of

file

“inventory.txt”

of

folder

“__HardwareInfo”

of

client folder

of

site

whose

(name

of

it

starts with

“actionsite”
))

else

if

(windows

of

operating system)

then

(
if

(
exist

(string value

of

select

“ProcessorType from win32_Processor”

of

wmi))

then

(string value

of

select

“ProcessorType from win32_Processor”

of

wmi)

else

(
""
))

else

(
""
))
&

" | "

&
(
if

(name

of

operating system

as

lowercase

contains

“sun”
)

then

(state

of

processor

as

string)

else

if

(name

of

operating system

as

lowercase

contains

“linux”
)

then

(
if

(
exists

dmi)

then

(unique value

of

status

of

processor_information

of

dmi

as

string)

else

(
""
))

else

if

(windows

of

operating system)

then

(
if

exists

(string value

of

select

“Status from win32_Processor”

of

wmi)

then

(string value

of

select

“Status from win32_Processor”

of

wmi

as

string)

else

(
""
))

else

(
""
))

E:
Singular expression refers to non-unique object.

the above relevance works only on servers which has single processor,could you please suggest how this relevance can be changed so that it will give results on machine where there are multiple processors

(imported comment written by Darknight)

please help …

(imported comment written by VitaliLukyanau)

Could you say how you insert relevance statements colored ? without “do it manually for every keyword” :slight_smile:

I see there is better inspector
SMBIOS
exists than dmi

“The System Management BIOS (SMBIOS) specification defines data structures and access methods in the BIOS. These Inspectors are designed to supersede the DMI Inspectors.”

Idea was to join all values together for one OS and from one inspector

I see it like that (don’t have Sun or Linux right now to test returned values)

if (name of operating system as lowercase contains "sun")
then ("" & "|" & type of it & "|" & state of it) of processors
else if (name of operating system as lowercase contains "linux")
then (value "processor_manufacturer" of it as string & "|" & value "processor_type" of it as string & "|" & value "status" of it as string) of (structures "processor_information" of smbios) whose (value "processor_manufacturer" of it as string does not contain "0")
else if (name of operating system as lowercase contains "win")
then (string value of property "Manufacturer" of it & "|" & string value of property "ProcessorType" of it & "|" & string value ofproperty "Status" of it)
of (select objects "Manufacturer,ProcessorType, Status from win32_Processor" of wmi) whose (string value of property "Manufacturer" of it does not contain "0")
else "OS is NOT Windows/Sun/Linux"

if you will have error then define for which OS

(imported comment written by Darknight)

Thanks vitaliLukayanau … the above relevance is getting passed correctly in windows as well as in linux as belwo :

Q: if (name of operating system as lowercase contains “sun”) then ("" & “|” & type of it & “|” & state of it) of processors else if (name of operating system as lowercase contains “linux”) then (value “processor_manufacturer” of it as string & “|” & value “processor_type” of it as string & “|” & value “status” of it as string) of (structures “processor_information” of smbios) whose (value “processor_manufacturer” of it as string does not contain “0”) else if (name of operating system as lowercase contains “win”) then (string value of property “Manufacturer” of it & “|” & string value of property “ProcessorType” of it & “|” & string value ofproperty “Status” of it) of (select objects “Manufacturer,ProcessorType, Status from win32_Processor” of wmi) whose (string value of property “Manufacturer” of it does not contain “0”) else “OS is NOT Windows/Sun/Linux”

A: GenuineIntel|3|65

T: 1575

but the issue is when i try to insert ProcessorArchitecture_Processor and ProcessorArchitecture_Family relevances in to the above relevance…

Could you please let me know how can i get the simmilar result while joining the below 9 separate relevances together (as per my original post in the forum):

q:/Manufacturer Name - Processor/ (if (name of operating system as lowercase contains “sun”) then ("") else if (exists dmi) then ( processor_manufacturers of processor_informations of dmi as string) else ("")) whose (it does not contain “0”)

A:GenuineIntel

A:GenuineIntel

T:0.200 ms

q:/Level_Processor/ if (windows of operating system) then(if exists (string values of selects “Level from Win32_Processor” of wmi) then (string values of selects “Level from Win32_Processor” of wmi) else ("")) else ("")

A:6

A:6

T:14.112 ms

q:/PNPDeviceID_Processor/ if (unix of operating system) then ("") else if (windows of operating system) then (if exists (string values of selects “PNPDeviceID from win32_Processor” of wmi) then (string values of selects “PNPDeviceID from win32_Processor” of wmi) else ("")) else ("")

A:

T:7.996 ms

q:/PowerManagementSupported_Processor/ if (unix of operating system) then ("") else if (windows of operating system) then (if exists (string values of selects “PowerManagementSupported from win32_Processor” of wmi) then (string values of selects “PowerManagementSupported from win32_Processor” of wmi) else ("")) else ("")

A:False

A:False

T:15.347 ms

q:/ProcessorArchitecture_Processor/ if (name of operating system as lowercase contains “sun”) then (types of processors as string) else if (name of operating system as lowercase contains “linux”) then (parenthesized parts 1 of (matches (regex “ProcessorArchitecture=(.+)”) of it) of lines whose (it contains “ProcessorArchitecture=”) of file “inventory.txt” of folder “__HardwareInfo” of client folder of site whose (name of it starts with “actionsite”)) else if (windows of operating system) then (if exists (string values of selects “Architecture from win32_Processor” of wmi) then (string values of selects “Architecture from win32_Processor” of wmi) else ("")) else ("")

A:9

A:9

T:14.747 ms

q:/ProcessorFamily_Processor/ family names ofprocessors

A:Xeon

A:Xeon

T:0.043 ms

q:/ProcessorStatus_Processor/ if (name of operating system as lowercase contains “sun”) then (states of processors as string) else if (name of operating system as lowercase contains “linux”) then (if (exists dmi) then (unique values of statuss of processor_informations of dmi as string) else ("")) else if (windows of operating system) then (if exists (string values of selects “Status from win32_Processor” of wmi) then (string values of selects “Status from win32_Processor” of wmi as string) else ("")) else ("")

A:OK

A:OK

T:14.746 ms

q:/ProcessorType_Processor/ if (name of operating system as lowercase contains “sun”) then(type of processor as string) else if (name of operating system as lowercase contains “linux”) then (parenthesized parts 1 of (matches (regex “Processor_Type:(.+)”) of it) of lines whose (it contains “Processor_Type:”) of file “inventory.txt” of folder “__HardwareInfo” of client folder of site whose (name of it starts with “actionsite”)) else if (windows of operating system) then (if (exist (string values of selects “ProcessorType from win32_Processor” of wmi)) then (string values of selects “ProcessorType from win32_Processor” of wmi) else ("")) else ("")

A:3

A:3

T:14.999 ms

q:/UpgradeMethod_Processor/ if (unix of operating system) then (if (exists dmi) then (unique values of processor_upgrades of processor_informations of dmi as string)else (“N/A”)) else if (windows of operating system) then (if (exists (string values of selects “UpgradeMethod from Win32_Processor” of wmi)) then (string values of selects “UpgradeMethod from Win32_Processor” of wmi) else ("")) else ("")

A:4

A:4

T:17.759 ms

1 Like

(imported comment written by jgstew)

Here is part of it, with some changes:

((it as string) of value “processor_manufacturer” of structure “processor_information” of smbios) & “|” & ((it as string) of value “processor_type” of structure “processor_information” of smbios) & “|” & ((it as string) of value “processor_id” of structure “processor_information” of smbios) & “|” & (/PowerManagementSupported_Processor/ if (unix of operating system) then ("") else if (windows of operating system) then (if exists (string value of selects “PowerManagementSupported from win32_Processor” of wmi) then (unique value of string value of selects “PowerManagementSupported from win32_Processor” of wmi) else ("")) else ("")) & “|” & (/ProcessorArchitecture_Processor/ if (name of operating system as lowercase contains “sun”) then (unique value of types of processors as string) else if (name of operating system as lowercase contains “linux”) then (parenthesized part 1 of (matches (regex “ProcessorArchitecture=(.+)”) of it) of lines whose (it contains “ProcessorArchitecture=”) of file “inventory.txt” of folder “__HardwareInfo” of client folder of site whose (name of it starts with “actionsite”)) else if (windows of operating system) then (if exists (string values of selects “Architecture from win32_Processor” of wmi) then (unique value of string values of selects “Architecture from win32_Processor” of wmi) else ("")) else ("")) & “|” & (family name of main processor)

Why are you combining multiple of these into a single result?