I am trying to use below relevance for our Linux/Unix machines but Service name & Image path not defined for Linux, although its perfectly working fine for Windows.
Any suggestions please.
(service name of it, state of it, image paths of it) of services whose (service name of it as lowercase contains "xyz")
but Want to also print the name of the linux/unix process similar to Process Name or Service Name, what are the options we have for that.
Also when I am running it for Linux its working but for Windows throwing error.
Q: if not windows of operating system then pathnames of image files of processes whose (name of it as lowercase = "besclient") else (service name of it, state of it, image paths of it) of services whose (service name of it as lowercase contains "besclient")
A: /opt/BESClient/bin/BESClient
T: 46103
Q: if not windows of operating system then pathnames of image files of processes whose (name of it as lowercase = "besclient") else (service name of it, state of it, image paths of it) of services whose (service name of it as lowercase contains "besclient")
E: Incompatible types.
There is a different result type between the Windows and Linux expression which is why it throws the āIncompatible typesā. The Linux expression is a plural string, the Windows expression is a plural tuple string. One way to cater for that could be something like
Windows results
Q: if not (windows of operating system) then ((name of it & ", Running, " & pathname of image file of it) of processes whose (name of it as lowercase = "besclient")) else ((service name of it &", "& state of it & ", " & image path of it) of services whose (service name of it as lowercase contains "besclient"))
A: BESClient, Running, "C:\Program Files (x86)\BigFix Enterprise\BES Client\BESClient.exe"
T: 1612.237 ms
I: plural string
Linux results
Q: if not (windows of operating system) then ((name of it & ", Running, " & pathname of image file of it) of processes whose (name of it as lowercase = "besclient")) else ((service name of it &", "& state of it & ", " & image path of it) of services whose (service name of it as lowercase contains "besclient"))
A: BESClient, Running, /opt/BESClient/bin/BESClient
A: BESClient, Running, /opt/BESClient/bin/BESClient
T: 7854