Oracle Cloud Infrastructure
To retrieve some useful information about the (linux) server you are on, try these commands from a shell prompt...
hostnamectl
rpm -qa --last
If it's an Oracle database server, try this...
rpm -qa | egrep -i 'dbaas|exa|dcs'
Note that this will return nothing by default on a Compute node that just happens to be running a database but would be expected to return some information on a Database node.*** Needs review - doesn't seem to work ***
TENANCY=$(oci iam compartment list \
--all \
--compartment-id-in-subtree true \
--access-level ACCESSIBLE \
--include-root \
--raw-output \
--query "data[?contains(\"id\",'tenancy')].id | [0]")
echo ${TENANCY}
f1=$(oci iam user list --compartment-id ${TENANCY} | grep description | awk 'NR==1 {print $2}' | sed -e 's/"//g' -e 's/,//g')
f2=$(oci iam user list --compartment-id ${TENANCY} | grep description | awk 'NR==2 {print $2}' | sed -e 's/"//g' -e 's/,//g')
USEROCID=$(oci iam user list --compartment-id ${TENANCY} --output table | grep $f2 | grep $f1 | awk {'print $30'})
echo ${USEROCID}