Home >Computer Tutorials >Computer Knowledge >ps -ef | grep find information

ps -ef | grep find information

WBOY
WBOYforward
2024-02-19 20:24:031194browse

ps -ef | grep 查找信息

ps: Display a process

grep (Global Regular Expression Print) is a powerful text search tool designed to be used by all users. It can search text through regular expressions and print matching lines.

|: Pipe naming refers to the simultaneous execution of the ps command and the grep command (it can be regarded as the function of a connection)

-e: Show all processes

-f: full format

ps: Display a process

grep (Global Regular Expression Print) is a powerful text search tool designed to be used by all users. It can search text through regular expressions and print matching lines.

|: Pipe naming refers to the simultaneous execution of the ps command and the grep command (it can be regarded as the function of a connection)

-e: Show all processes

-f: full format

//以下这条命令是检查 redis 进程是否存在:ps -ef |grep redis[root@localhost ~]# ps -ef | grep redis
root      6282  2761  0 20:15 pts/0    00:00:13 redis-server *:6379root      9519  9142  0 20:48 pts/3    00:00:00 grep --color=auto redis

1. The specific field meanings are as follows:

UID: User ID, which means that the program is owned by the UID, but the output is the user name. For example, the above output is the root user

PID: ID of the process, ID of the program

PPID: Parent process ID, ID of the superior parent program

C: The percentage of CPU occupied by this process

STIME: The time since the process was started

TTY: The terminal location of the login user, which terminal the process is running on. If it is not related to the terminal, it will display? If it is pts/0, etc., it means that the host process is connected by the network.

TIME: CPU time used

CMD: Commands and parameters to start the process

"ps -ef" is a commonly used command, used in Linux and UNIX systems to view process information running in the current system. The following is an explanation of the meaning of each field in the command:

UID: The user ID of the owner of the process.

PID: Process identifier.

PPID: The process ID of the parent process.

C: CPU usage.

STIME: The time when the process started.

TTY: The terminal where the process is located.

TIME: The CPU time already occupied by the process.

CMD: The command line of the process.

References:

  1. https://www.cnblogs.com/mecell224/p/16116395.html

The above is the detailed content of ps -ef | grep find information. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete