In linux inside ps -ef | grep tomcat What does it mean

 

View and linux tomcat process have a relationship of command

E.g

[root@localhost bin]# ps -eaf | grep tomcat
root       5091      1  0 23:04 pts/0    00:00:07 /opt/soft/jdk1.8.0_144/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat/apache-tomcat-8.0.28/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/apache-tomcat-8.0.28/endorsed -classpath /opt/tomcat/apache-tomcat-8.0.28/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-8.0.28/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat/apache-tomcat-8.0.28 -Dcatalina.home=/opt/tomcat/apache-tomcat-8.0.28 -Djava.io.tmpdir=/opt/tomcat/apache-tomcat-8.0.28/temp org.apache.catalina.startup.Bootstrap start
root       5412   4063  0 23:35 pts/0    00:00:00 grep --color=auto tomcat
[root@localhost bin]# ps -ef | grep tomcat
root       5091      1  0 23:04 pts/0    00:00:07 /opt/soft/jdk1.8.0_144/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat/apache-tomcat-8.0.28/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/apache-tomcat-8.0.28/endorsed -classpath /opt/tomcat/apache-tomcat-8.0.28/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-8.0.28/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat/apache-tomcat-8.0.28 -Dcatalina.home=/opt/tomcat/apache-tomcat-8.0.28 -Djava.io.tmpdir=/opt/tomcat/apache-tomcat-8.0.28/temp org.apache.catalina.startup.Bootstrap start
root       5414   4063  0 23:35 pts/0    00:00:00 grep --color=auto tomcat

ps -ef meaning is long format display all processes, "|" pipeline, meaning the output of ps in front of the back as input, then grep tomcat is to find information about the process and the character tomcat in all processes in and displayed .

ps command is the most appropriate case is quite strong fundamental to the process view the command
ps [options]
-e show all processes, environment variables
-f full-format
-h does not display the title
-l long format
-w wide output
a display terminal to all processes, including the processes of other users
r is operatively display only processes
x there is no display control terminal to process 

Another explanation

ps: a process will be displayed, Linux is the most common process view command, powerful

-A: Show All Applications

-e: effect of this parameter is specified and the same "A" parameter

-f: display UID, PPID and STIME

grep: search, text search tool, stands for Global Expression Print, represents the global regular expression match the lines of print

|: Pipe command, ps and grep refers to the simultaneous execution

Another example : ps -ef | grep java, java process to check whether there is

ps -ef | grep java

Fields have the following meanings:

UID     PID     PPID     C     STIME     TTY     TIME        CMD

roo      1306   1           0     09:23        ?          00:00:17   /root/work/jdk1.8/bin/java

UID: The program is owned UID

PID: ID of the program

ID superiors parent program: PPID

C: the percentage of CPU resources used

STIME: system startup time

TTY: terminal's location Login

TIME: Use of CPU time away

CMD: The command issued what

 

 



Reference link: https: //blog.csdn.net/Johnson8702/article/details/82108433

 

Guess you like

Origin www.cnblogs.com/isme-zjh/p/11462496.html