Check out this article by Vikram Das about how to read OS environment variables using PL/SQL.
I did not know that!
NB! I am running one more Advanced Oracle Troubleshooting training in 2018! You can attend the live online training and can download personal video recordings too. The Part 1 starts on 29th January 2018 - sign up here!