Get all basic SAP system information from profiles using one command.
It scans /sapmnt directory and list main config parameters for every SAP instance and every component found.
It’s written in a form that can be simply customized.
For Linux hosts:
find /sapmnt/???/profile/* ! -name . -prune -type f \ \( \ \( -name DEFAULT.PFL \) \ -o \( -name ???_ASCS* ! -name "*.*" \) \ -o \( -name ???_SCS* ! -name "*.*" \) \ -o \( -name ???_D* ! -name "*.*" \) \ -o \( -name ???_J* ! -name "*.*" \) \ \) \ -exec echo \; -exec echo -e '\033[0;31m' {} '\033[0m' \; \ \( -exec grep "SAPFQDN=" {} \; -o -exec true \; \) \ \( -exec grep "SAPFQDN =" {} \; -o -exec true \; \) \ \( -exec grep "system/type=" {} \; -o -exec true \; \) \ \( -exec grep "system/type =" {} \; -o -exec true \; \) \ \( -exec grep "OS_UNICODE=" {} \; -o -exec true \; \) \ \( -exec grep "OS_UNICODE =" {} \; -o -exec true \; \) \ \( -exec grep "SAPDBHOST=" {} \; -o -exec true \; \) \ \( -exec grep "SAPDBHOST =" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/dbhost=" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/dbhost =" {} \; -o -exec true \; \) \ \( -exec grep "SAPGLOBALHOST=" {} \; -o -exec true \; \) \ \( -exec grep "SAPGLOBALHOST =" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/host=" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/host =" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/system=" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/system =" {} \; -o -exec true \; \) \ \( -exec grep "SAPLOCALHOST=" {} \; -o -exec true \; \) \ \( -exec grep "SAPLOCALHOST =" {} \; -o -exec true \; \) \ \( -exec grep "SAPSYSTEM=" {} \; -o -exec true \; \) \ \( -exec grep "SAPSYSTEM =" {} \; -o -exec true \; \)
For AIX/Solaris hosts:
find /sapmnt/???/profile/* ! -name . -prune -type f \ \( \ \( -name DEFAULT.PFL \) \ -o \( -name ???_ASCS* ! -name "*.*" \) \ -o \( -name ???_SCS* ! -name "*.*" \) \ -o \( -name ???_D* ! -name "*.*" \) \ -o \( -name ???_J* ! -name "*.*" \) \ \) \ -exec echo \; -exec echo '\033[0;31m' {} '\033[0m' \; \ \( -exec grep "SAPFQDN=" {} \; -o -exec true \; \) \ \( -exec grep "SAPFQDN =" {} \; -o -exec true \; \) \ \( -exec grep "system/type=" {} \; -o -exec true \; \) \ \( -exec grep "system/type =" {} \; -o -exec true \; \) \ \( -exec grep "OS_UNICODE=" {} \; -o -exec true \; \) \ \( -exec grep "OS_UNICODE =" {} \; -o -exec true \; \) \ \( -exec grep "SAPDBHOST=" {} \; -o -exec true \; \) \ \( -exec grep "SAPDBHOST =" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/dbhost=" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/dbhost =" {} \; -o -exec true \; \) \ \( -exec grep "SAPGLOBALHOST=" {} \; -o -exec true \; \) \ \( -exec grep "SAPGLOBALHOST =" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/host=" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/host =" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/system=" {} \; -o -exec true \; \) \ \( -exec grep "j2ee/scs/system =" {} \; -o -exec true \; \) \ \( -exec grep "SAPLOCALHOST=" {} \; -o -exec true \; \) \ \( -exec grep "SAPLOCALHOST =" {} \; -o -exec true \; \) \ \( -exec grep "SAPSYSTEM=" {} \; -o -exec true \; \) \ \( -exec grep "SAPSYSTEM =" {} \; -o -exec true \; \)
Not tested on HP-UX, but should work.
Output example (FQDN hidden):