Almost all of this information is available in environment variables that you can check in your script. More info here: