Solaris 2.7 Sparc , Ksh:
I have a script that checks for a process ID by grep a string from the output of the ps , depend on the existance of the process,it performs a specific action.
PID=`/usr/bin/ps -eo pid,comm,args | grep "process string" | /usr/bin/awk '{print $1}'`
The command line that runs the application exist in a file called #runserver
The problem is that the development team always changing the command line that runs this application,so sometimes ps output will reflect a different string or you can say shifting the string so it will not appear.
My question is can we increase the limit of the process string line catched fom the ps output command,if not can I use to check the existance of the PID from checking the file "runserver" that include the command line.
Thanks for help
I have a script that checks for a process ID by grep a string from the output of the ps , depend on the existance of the process,it performs a specific action.
PID=`/usr/bin/ps -eo pid,comm,args | grep "process string" | /usr/bin/awk '{print $1}'`
The command line that runs the application exist in a file called #runserver
The problem is that the development team always changing the command line that runs this application,so sometimes ps output will reflect a different string or you can say shifting the string so it will not appear.
My question is can we increase the limit of the process string line catched fom the ps output command,if not can I use to check the existance of the PID from checking the file "runserver" that include the command line.
Thanks for help