os_info : correction pour parcourir tous les listeners
This commit is contained in:
@@ -15,14 +15,16 @@ run_and_print "ps -ef | grep tnslsnr | grep -v grep"
|
|||||||
|
|
||||||
print_h2 "Statut du listener : ${listener_name}"
|
print_h2 "Statut du listener : ${listener_name}"
|
||||||
# Boucle pour le statut du listener, car elle est plus complexe
|
# 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
|
# 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##')
|
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 //')
|
listener_name=$(echo "$l" | perl -lne 'print $1 if /\btnslsnr\s+(\S+)/' | sed 's/tnslsnr //')
|
||||||
|
|
||||||
if [ -n "$binary_path" ] && [ -n "$listener_name" ]; then
|
if [ -n "$binary_path" ] && [ -n "$listener_name" ]; then
|
||||||
export TNS_ADMIN="$binary_path/network/admin"
|
export TNS_ADMIN="$binary_path/network/admin"
|
||||||
lsnrctl_command="$binary_path/bin/lsnrctl status $listener_name"
|
lsnrctl_command="$binary_path/bin/lsnrctl status $listener_name"
|
||||||
# echo "<b>Listener: ${listener_name}</b>"
|
log_info "Traitement du listener : ${listener_name}"
|
||||||
run_and_print "$lsnrctl_command"
|
run_and_print "$lsnrctl_command"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -69,6 +71,7 @@ case "$os_type" in
|
|||||||
print_h2 "Caractéristiques CPU (lscpu)"
|
print_h2 "Caractéristiques CPU (lscpu)"
|
||||||
run_and_print "lscpu"
|
run_and_print "lscpu"
|
||||||
|
|
||||||
|
log_info "Pause de 20 secondes pour collecter les statistiques vmstat ..."
|
||||||
print_h2 "Statistiques VM (vmstat 2 20)"
|
print_h2 "Statistiques VM (vmstat 2 20)"
|
||||||
run_and_print "vmstat 2 20"
|
run_and_print "vmstat 2 20"
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ select /* db-html-report */
|
|||||||
select
|
select
|
||||||
a.inst_id,
|
a.inst_id,
|
||||||
a.sql_id,
|
a.sql_id,
|
||||||
to_char(numtodsinterval(a.elapsed_time/ 1000000, 'SECOND'), 'HH24:MI') as elapsed,
|
-- to_char(numtodsinterval(a.elapsed_time/ 1000000, 'SECOND'), 'HH24:MI') as elapsed,
|
||||||
|
to_char(trunc(sysdate) + numtodsinterval(a.elapsed_time/ 1000000, 'SECOND'), 'HH24:MI:SS') as elapsed,
|
||||||
substrb(replace(a.sql_text,'',' '),1,55) as sql_text,
|
substrb(replace(a.sql_text,'',' '),1,55) as sql_text,
|
||||||
a.buffer_gets, -- Lecture en memoire
|
a.buffer_gets, -- Lecture en memoire
|
||||||
a.disk_reads, -- Lecture sur disque
|
a.disk_reads, -- Lecture sur disque
|
||||||
|
|||||||
Reference in New Issue
Block a user