ServiceName & ImagePath Relevance for Linux/Unix

Hi,

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")

Services (daemons, really) on Linux donā€™t have display names or paths. A daemon may be made up of several process in fact.

You may need to use the ā€˜processā€™ inspectors instead.

Edit: typing is hard

I already tried that too, but that also not helping with process name or process path or pathname or imagepath.

Please give a try to

pathnames of image files of processes whose (name of it as lowercase = "my_process")

As usual Iā€™m not in front of a computer but the reference is at
https://developer.bigfix.com/relevance/reference/process.html#image-file-of-process-file

1 Like

Thanks @JasonWalker !

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
1 Like