解决aix平台上执行emctl start dbconsole 报错:ps: invalid list with -o.的问题
发布时间:2019-08-13 00:00:00
$ emctl start dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved. https://serviceip2:5501/em/console/aboutApplication ps: invalid list with -o. ps: illegal option -- - Usage: ps [-ANPaedfklmMZ] [-n namelist] [-F Format] [-o specifier[=header],...] [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist] [-@ [wparname] ] Usage: ps [aceglnsuvwxX] [t tty] [ProcessNumber] 这个是在aix上的一个bug:具体见metalink:758568.1 原因: In emctl.pl we have a command as below: ps -p $PID -o cmd --cols 1000 |grep DEMDROOT In AIX platforms for some OS kernels, this command doesn't work. The correct command is: ps -p $PID -o args | grep DEMDROOT 解决办法: If you get these errors while starting DBConsole, follow below action plan: Follow below action plan. a) Stop DBConsole - 'emctl stop dbconsole' b) Take backup of 'emctl.pl' from $ORACLE_HOME/bin c) Edit emctl.pl and goto line number 1249, which is: my $ps=`ps -p $PID -o cmd --cols 1000 |grep DEMDROOT`; Modify above line as below: my $ps=`ps -p $PID -o args | grep DEMDROOT`; d) Save the file. e) Start DBConsole - 'emctl start dbconsole' from $ORACLE_HOME/bin 结论: 修改 $ORACLE_HOME/bin/emctl.pl文件中内容后,问题解决. |