On 07/07/2011 20:07, Christopher Schultz wrote: > Lance, > > On 7/7/2011 12:03 PM, Campbell, Lance wrote: >> Tomcat 6 enhancement: >> Please consider giving us the ability to change the process name for linux >> applications. I have identified all of the places I believe this needs to >> be done. >> >> Would you please consider adding the following to the catalina.sh file: >> 1) In the variable section at the top please add: >> >> CATALINA_PROCESS_NAME (Optional) This variable will set the linux process >> name to a particular value. >> >> 2) There needs to be an if statement that checks to see if a value has been >> passed to CATALINA_PROCESS_NAME. If there has been then the string "-a " >> needs to be appended to the front of the value. If not then the value would >> be "". >> >> 3) Then replace any occurance of "$_RUNJAVA" with exec >> "$CATALINA_PROCESS_NAME" . This will allow the process to be named. >> > I had no idea that bash's exec built-in allowed for this. Kind of cool. > Two question/comments: > > 1. You can pass any dummy argument to the JVM in order to do > things like ps | grep if you just want to look for your process > in the process table. Is there some compelling reason to replace > "java" with "foo" in the process table? Example: > > CATALINA_OPTS=" .... -DmySearchString ..." > "$CATALINA_BASE/bin/startup.sh" > > Then you can do "ps | grep mySearchString" and find it.
Or just use CATALINA_PID. > 2. This will only work for bash, not for other shells. In order for any > patch to be accepted, you'll have to include a test to determine > whether bash is the current shell. And explain why this approach rather than using CATALINA_PID. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org