Support Questions
Find answers, ask questions, and share your expertise

How to check the environment variables that ambari-agent uses

How to check the environment variables that ambari-agent uses

Explorer

Because `sudo printenv PATH` is different from `sudo -i printenv PATH`, I assumed that `sudo /sbin/ambari-agent restart` would be different from `sudo -i /sbin/ambari-agent restart`.

 

To verify this, I want to check the environment variables of each ambari-agent, one that was restarted with `sudo` command and the other that was restarted with `sudo -i` command.

 

How can I achieve this?