Command to get exact tomcat process I am running ignoring other java process

Team,
I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list.

How do I get my exact tomcat process running and that is unique? via shell script?

First we need more information about your system - is it Unix or Linux; what flavour and version.

Second, how are you running tomcat; is there one or multiple instances of tomcat being run from these batch files?

I know this is a silly question, but what identifies the tomcat process as the one you are after?

Andrew

Are you saying that you get process for other users, you are seeing a grep process listed or something else entirely? I can't tell from your description.

Please show us the output (pasted in CODE tags) and then we can see what we're working with.

Thanks, in advance,
Robin

Check your tomcat installation(s) for catalina.pid file(s).
The PID should be written in that file.

Hope that helps
Regards
Peasant.

Did you try running jps instead of ps ?

Output the full package name for the application's main class or the full path name to the application's JAR file:-

jps -l 

Output the arguments passed to the main method. The output may be null for embedded JVMs:-

jps -m