From cea287fb1eb1f052c8ba70207478c5719d71ba45 Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Wed, 19 Nov 2025 17:45:07 +0100 Subject: [PATCH] =?UTF-8?q?d=C3=A9placement=20des=20donn=C3=A9es=20base=20?= =?UTF-8?q?et=20listener=20dans=2010=5Foracle=5Finstallation.=20Les=20list?= =?UTF-8?q?ener=20en=20bas=20de=20la=20page,=20car=20status=20trop=20long?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/09_os_info.sh | 22 ---------------------- sh/10_oracle_installation.sh | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 22 deletions(-) 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