From 57b338f4166f84b312881ab867f9e890e631f79d Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Thu, 16 May 2024 17:35:03 +0200 Subject: [PATCH] Runtime option fix and minor changes Signed-off-by: Martin Zeithaml --- bin/commands/support/.help | 1 + bin/commands/support/index.sh | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/bin/commands/support/.help b/bin/commands/support/.help index 07bfab5e29..6bb8eb4639 100644 --- a/bin/commands/support/.help +++ b/bin/commands/support/.help @@ -7,6 +7,7 @@ This command will collect these information: * Java version * Node.js version * External Security Manager + * CEE Runtime Options - Zowe configurations * Zowe manifest.json * Zowe configuration file diff --git a/bin/commands/support/index.sh b/bin/commands/support/index.sh index 838715d520..20c024ef43 100644 --- a/bin/commands/support/index.sh +++ b/bin/commands/support/index.sh @@ -11,6 +11,13 @@ # Copyright Contributors to the Zowe Project. ####################################################################### +print_message_file() { + msg="${1}" + out_file="${2}" + print_message "- ${msg}" + echo "${msg}" >> "${out_file}" +} + print_level0_message "Collect information for Zowe support" ############################### @@ -43,23 +50,23 @@ print_debug "Temporary directory created: ${tmp_dir}" print_message ############################### -print_level1_message "Collecting information about z/OS, Java, NodeJS and ESM" -VERSION_FILE="${tmp_dir}/version_output" +print_level1_message "Collecting various environment information" +ENVIRONMENT_FILE="${tmp_dir}/environment_output" +echo "[Environment information]" > "${ENVIRONMENT_FILE}" ZOS_VERSION=`operator_command "D IPLINFO" | grep -i release | xargs` -print_message "- z/OS: ${ZOS_VERSION}" -CEE_OPTIONS=`tsocmd "OMVS RUNOPTS('RPTOPTS(ON)')"` -print_message "- CEE Runtime Options: ${CEE_OPTIONS}" +if [ -z "${ZOS_VERSION}" ]; then + ZOS_VERSION=`sysvar SYSOSLVL` +fi JAVA_VERSION=`${JAVA_HOME}/bin/java -version 2>&1 | head -n 1` -print_message "- Java: ${JAVA_VERSION}" NODE_VERSION=`${NODE_HOME}/bin/node --version` -print_message "- NodeJS: ${NODE_VERSION}" ESM=`"${ZWE_zowe_runtimeDirectory}/bin/utils/getesm"` -print_message "- External Security Manager: ${ESM}" -echo "z/OS version: ${ZOS_VERSION}" > "${VERSION_FILE}" -echo "Java version: ${JAVA_VERSION}" >> "${VERSION_FILE}" -echo "NodeJS version: ${NODE_VERSION}" >> "${VERSION_FILE}" -echo "External Security Manager: ${ESM}" >> "${VERSION_FILE}" -echo "CEE Runtime Options: ${CEE_OPTIONS}" >> "${VERSION_FILE}" +CEE_OPTIONS=`tsocmd "OMVS RUNOPTS('RPTOPTS(ON)')" 2>&1` + +print_message_file "z/OS version: ${ZOS_VERSION}" "${ENVIRONMENT_FILE}" +print_message_file "Java version: ${JAVA_VERSION}" "${ENVIRONMENT_FILE}" +print_message_file "NodeJS version: ${NODE_VERSION}" "${ENVIRONMENT_FILE}" +print_message_file "External Security Manager: ${ESM}" "${ENVIRONMENT_FILE}" +print_message_file "CEE Runtime Options: ${CEE_OPTIONS}" "${ENVIRONMENT_FILE}" print_message ###############################