Quote:
|
Hi,
Friend, Sorry. Kindly find the script. Code:
redssr |
Its my mistake.
Its started but not getting stoped. Kindly find the output Code:
ksh -x opensync_linux stop |
you lost the indentation, but let us ignore that
why are you using ksh? Actually, let us ignore that as well Your error Code:
ps: Not a recognized flag: - Code:
# Returns 0 if the process with PID $1 is our Java service process. AIX's ps is different to the one the script was written for Code:
# Returns 0 if the process with PID $1 is our Java service process. post output of Code:
ps | grep java I honestly have no idea why that grep has --binary, we shall cross that bridge later.. |
Hi,
Done changes according to yr sugesstions. Here is the output. code given by u. Code:
function checkProcessIsOurService { Code:
opensync_linux start Code:
ps |grep java Regards. redssr |
Quote:
The problem seems to be with this command: Code:
ps -p $pid --no-headers -o comm Code:
ps -p $pid -o comm | grep -v COMMAND |
Hi,
Changes done as per yr suggestion. Still same output. Code:
opensync_linux start redssr |
Hi there,
Surely you can figure some of this out yourself? The result is not the same. The "ps" error is gone, and you now have a "grep" error. The cause is the same - using arguments which are not supported by AIX. How about looking at the man page to try and fix it yourself? Good luck! Clifford |
Hi,
Friends, Here is my other problem now, Code:
ksh -x opensync_linux start old code Code:
ps -p $pid -o comm | grep -v COMMAND Code:
ps -p $pid -o comm | grep -R COMMAND redssr |
Quote:
you will not be changing their shell, only using it for the script.. However, that will not help you here, since the problem is the 'utilities' used in the script are using a different, incompatible syntax. I did say you needed to experiment with that ps found a manual ( which should have been very simple for yourself ) http://publib.boulder.ibm.com/infoce...ixcmds4/ps.htm the -T was wrong, Code:
-T pid Displays the process hierarchy rooted at a given pid in a tree format using ASCII art. Code:
function checkProcessIsOurService { now your grep, I don't think you need --binary from gnu's grep manpage on debian Code:
-U, --binary |
Hi,
Friend, Sorry if you had got hurted. It was my mistake. Actually i am not as expert in AIX as in Linux. As said before this script i had developed in linux and its working fine and i copy pasted the same script here. But due to your guidelines i had reached till here. And i am realy thankful for the same. This is the 9th day (excluding weekoffs) where i am working on AIX. I even don't know the ABCD of AIX, but i am trying my best to make it possible. You were right. they had sh shel available and i used the same now for script. I corrected the code as per yr suggestions. and here is the output. Code:
sh -x opensync_linux start Regards, redssr |
Quote:
check the other files in /proc/8257712/ , Or check the cwd is a link to /usr/cachesys/od_bk/Server_Platform/ which is probably enough as a 'double check' |
Yes there is a link pointing to the directory.
Code:
Code:
/proc/pid/cmdline Code:
/proc/pid/cwd Code:
sh -x opensync_linux status redssr |
Quote:
you are trying to grep a symlink? lets go back and see what you are doing Code:
function checkProcessIsOurService { from manual Code:
args Code:
( ps -p $pid -o args= | grep -q "$javaCommandLineKeyword" ) || return 1 http://www.tldp.org/LDP/abs/html/lis...ml#LISTCONSREF I honestly can't recall if they work in plain sh re-write as if statements |
Hi,
Friend, Thanks for your most valuable help. It worked finally. I can't explain in words what u have done for me. Here is the output. Code:
redssr |
All times are GMT -5. The time now is 12:09 AM. |