Agent installation failed

Trying to upgrade our DC using rmad portal, the agent failed with "Failed: Bad exit code"

Also what is the command to log agent installation step when installing using cli.