PS command to display a process
The grep command is to find
The Middle | is a pipeline command that refers to the PS command executing concurrently with grep
PS is the most common and very powerful process view command under Linux.
The grep command is a lookup, a powerful text-search tool that can use regular expressions to search for text and print matching lines.
The following command checks whether the Java process exists: Ps-ef |grep java
The field has the following meanings:
UID PID PPID C stime TTY time CMD
ZZW 14124 13991 0 00:38 pts/0 00:00:00 grep--color=auto Dae
UID: The program is owned by the UID
PID: Is the ID of this program
PPID: Is the ID of its ancestor parent program
Percentage of resources used by C:CPU
Stime: System Boot time
TTY: The terminal location of the logged-in person
Time: Used off of the CPU.
CMD: What instructions are being issued
=======================================================================================================
Linux netstat viewing services and listening ports
[Email protected] ~]# NETSTAT-NLP
[[email protected] ~]# Netstat-nlp|grep LISTEN//View all current listening ports
[[email protected] ~]# Netstat-nlp|grep 80//View all 80 port usage
[[email protected] ~]# Netstat-nlp|grep 3306//View all 3306 port usage
Linux commands Daquan 20180614