VIOM Oracle Discovery hangs and creates a lot of 'su - oracle -c "lsnrctl status"' processes

book

Article ID: 100044390

calendar_today

Updated On:

Description

Error Message

VIOM Oralce Discovery doesn't finish successfully and creates a lot of 'su - oracle -c "lsnrctl status"' processes.

Cause

1. Customer's Oracle user .profile waits for interactive input

2. VIOM Database Discovery uses "su -" instead of "su" and causes .profile to be executed.

 

Resolution

Please modify the following file and changes "su -" to "su".

/opt/VRTSsfmh/bin/discover_oracle.pl

sub discover_listener
{
....
#                $op = `su - $user -c 'lsnrctl status $lsnr'`;
                $op = `su $user -c 'lsnrctl status $lsnr'`;
....
 

 

 

Issue/Introduction

Customer's Oracle user .profile presents a menu of choices and waits for interactive input. Since the VIOM Oracle Discovery tries to run the "lsnrctl status" command as the Oracle user by using "su -", the .profile is exectued and hangs there wainting for input. After VIOM Oracle Discovery times out the hanged command, it restarts another one and hence created many processes like the following. # ptree 15051
1316 /opt/VRTSsfmh/bin/xprtld -X 1 /etc/opt/VRTSsfmh/xprtld.conf
9404 /opt/VRTSsfmh/bin/perl /opt/VRTSsfmh/bin/mh_driver.pl --family APP --hidden --c
13153 /opt/VRTSsfmh/bin/perl /opt/VRTSsfmh/util/discover_oracle.pl
15051 sh -c su - oracle -c 'lsnrctl status LISTENER_XXXXX'
15076 -ksh -c lsnrctl status LISTENER_XXXXX