diff --git a/sh/09_os_info.sh b/sh/09_os_info.sh index 049026f..5682b69 100644 --- a/sh/09_os_info.sh +++ b/sh/09_os_info.sh @@ -7,27 +7,6 @@ source "$(dirname "$0")/utils.sh" os_type=$(uname -s) -print_h2 "Bases de données en cours d'exécution" -run_and_print "ps -ef | grep pmon | grep -v grep" - -print_h2 "Listeners en cours d'exécution" -run_and_print "ps -ef | grep tnslsnr | grep -v grep" - -print_h2 "Statut du listener : ${listener_name}" -# Boucle pour le statut du listener, car elle est plus complexe -# ps -ef | grep tnslsnr | egrep -i " LISTENER |${ORACLE_SID}" | grep -v grep | while read -r l; do -# On parcours tous les listener qui tournent sur le serveur pour afficher leur statut -ps -ef | grep tnslsnr | grep -v grep | while read -r l; do - binary_path=$(echo "$l" | perl -lne 'print $1 if /(\S*tnslsnr\S*)/' | sed 's#/bin/tnslsnr##') - listener_name=$(echo "$l" | perl -lne 'print $1 if /\btnslsnr\s+(\S+)/' | sed 's/tnslsnr //') - - if [ -n "$binary_path" ] && [ -n "$listener_name" ]; then - export TNS_ADMIN="$binary_path/network/admin" - lsnrctl_command="$binary_path/bin/lsnrctl status $listener_name" - log_info "Traitement du listener : ${listener_name}" - run_and_print "$lsnrctl_command" - fi -done print_h2 "Uptime" run_and_print "uptime" @@ -71,7 +50,6 @@ case "$os_type" in print_h2 "Caractéristiques CPU (lscpu)" run_and_print "lscpu" - log_info "Pause de 20 secondes pour collecter les statistiques vmstat ..." print_h2 "Statistiques VM (vmstat 2 20)" run_and_print "vmstat 2 20" diff --git a/sh/10_oracle_installation.sh b/sh/10_oracle_installation.sh index a42a027..70f8819 100644 --- a/sh/10_oracle_installation.sh +++ b/sh/10_oracle_installation.sh @@ -38,3 +38,23 @@ else echo "
Fichier ${ORA_INVENTORY}/ContentsXML/inventory.xml non trouvé.
" fi +print_h2 "Bases de données en cours d'exécution" +run_and_print "ps -ef | grep pmon | grep -v grep" + +print_h2 "Listeners en cours d'exécution" +run_and_print "ps -ef | grep tnslsnr | grep -v grep" + +# Boucle pour le statut du listener, car elle est plus complexe +# ps -ef | grep tnslsnr | egrep -i " LISTENER |${ORACLE_SID}" | grep -v grep | while read -r l; do +# On parcours tous les listener qui tournent sur le serveur pour afficher leur statut +ps -ef | grep tnslsnr | grep -v grep | while read -r l; do + binary_path=$(echo "$l" | perl -lne 'print $1 if /(\S*tnslsnr\S*)/' | sed 's#/bin/tnslsnr##') + listener_name=$(echo "$l" | perl -lne 'print $1 if /\btnslsnr\s+(\S+)/' | sed 's/tnslsnr //') + + if [ -n "$binary_path" ] && [ -n "$listener_name" ]; then + export TNS_ADMIN="$binary_path/network/admin" + print_h2 "Statut du listener : ${listener_name}" + lsnrctl_command="$binary_path/bin/lsnrctl status $listener_name" + run_and_print "$lsnrctl_command" + fi +done