I am unable to get mongod binary path using "db.serverStatus().process" on Ubuntu 20.04. I need to incorporate this command in a script. But "db.serverStatus().process" gives just 'mongod' as output. In Windows it gives exact path. I even included binary path in PATH environment variable and verified the path (echo $PATH).I tried using exact mongo shell path in the mongodb connect string yet same result(not simply mongo --host --port)
Thank you so much @wernfried-domscheit. It is a good one. Output of "db.serverCmdLineOpts().argv"
[ "/mongo/4.4.22/bin/mongod", "--config", "/etc/mongod.conf" ]
I slightly modified it. Now it is giving what is required. I am just accessing  element from the Array which is the exact 'mongod' binary path.
Output of "db.serverCmdLineOpts().argv"