As others already noted, you have seen the grep process. If you want to restrict the output to tomcat itself, you have two alternatives
wrap the first searched character in a character class
ps -ef | grep '[t]omcat'
This searches for tomcat too, but misses the grep [t]omcat
entry, because it isn't matched by [t]omcat
.
use a custom output format with ps
ps -e -o pid,comm | grep tomcat
This shows only the pid and the name of the process without the process arguments. So, grep is listed as grep
and not as grep tomcat
.