Relevance condition gives different result in non-windows qna

Hi All,

I’m checking the below relevance condition from Ubuntu OS /opt/BESClient/bin/qna, and I’m getting two different results from the root account and the normal user.

Result from the normal user terminal:
Q: names of processes whose (name of it contains “landscape”)
A: landscape-clien
A: landscape-broke
A: landscape-monit
A: landscape-manag
T: 17901

Result from root terminal:
Q: names of processes whose (name of it contains “landscape”)
T: 14832

systemctl result:
sudo systemctl status landscape-client.service
● landscape-client.service - Landscape client daemons
Loaded: loaded (/lib/systemd/system/landscape-client.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-10-24 16:24:05 IST; 9s ago
Docs: man:landscape-client(1)
man:landscape-config(1)
Main PID: 175910 (landscape-clien)
Tasks: 5 (limit: 18289)
Memory: 268.8M
CGroup: /system.slice/landscape-client.service
├─175910 /usr/bin/python3 /usr/bin/landscape-client
├─175912 /usr/bin/python3 /usr/bin/landscape-broker --ignore-sigint
├─175913 /usr/bin/python3 /usr/bin/landscape-monitor --ignore-sigint
├─175914 /usr/bin/python3 /usr/bin/landscape-manager --ignore-sigint
└─175922 /usr/bin/python3 /usr/bin/landscape-package-reporter --quiet

Oct 24 16:24:05 XXXXXXXXXXXXXXX systemd[1]: Started Landscape client daemons.
Oct 24 16:24:06 XXXXXXXXXXXXXXX landscape-client[175910]: 2023-10-24 16:24:06,377 INFO [MainThread] Watchdog watching for daemons.

I cannot use the “exist service” condition in non-windows OS for other applications than Besclient. Kindly suggest to me how to accomplish the service/process running check for my deployment.

Try it in an Analysis, or via WebUI Query using the “run in client” context.
I suspect that the qna utility on Linux only shows processes running under your current user account, and there’s no “run in client context” option on qna; but running in the client agent context all of the processes should be visible.

I have tried an analysis since WebUI Query is not working as expected since most of our workstations are remote. still getting as a result for below analysis.

names of processes whose (name of it contains “landscape”)

Can you please help me how to “run in client context” from Analysis?

Analysis always runs in “client context”

Thanks for the confirmation Orbiton,

Still, “names of processes whose (name of it contains “landscape”)” is giving as a result in analysis and from root terminal. I would like to use the below relevance for a fixlet, but due to this issue, I was not able to achieve this. Can someone help me resolve this issue?

exists name of process “landscape-client”

try

exists process whose (name of it = "landscape-client")

That will return true of false.

Your version will return True (if the process is running) or an error if the process is not running (because you are looking for the presence of a property when there is no object)

To illustrate:

q: exists name of process "BESConsole.exe"
A: True
I: singular boolean

q: exists process whose (name of it = "BESConsole.exe")
A: True
I: singular boolean

q: exists process whose (name of it = "madeupname")
A: False
I: singular boolean

q: exists name of process "madeupname"
E: Singular expression refers to nonexistent object.

@vvignesh6 on the Relevance Tab in the Fixlet or Task - you need that each result will return True or False, error is also not good result.

@trn gave you a great statement example
exists processes whose (name of it = “BESConsole.exe”)

https://developer.bigfix.com/relevance/guide/basics/exists.html