Home  >  Article  >  Operation and Maintenance  >  How to restart the process in linux?

How to restart the process in linux?

藏色散人
藏色散人Original
2019-05-21 15:49:2027059browse

How to restart the process in linux?

How to restart a process in Linux?

How to restart the process in Linux:

1. First, use ps -ef to find the execution statement of the process and retain it; the purpose of this is to retain the process The execution parameters remain unchanged;

For example, to restart the process of a single mongodb:

Find:

ps -ef|grep mongod

Get:

root 2928 2903 0 14:51 pts/0 00:00:00 grep /usr/local/mongodb/bin/mongod --config /etc/mongodb.cnf

2. Use kill -9 Kill the process by PID;

kill -9 2928

3. Use the reserved process statement to restart the process;

Execute:

/usr/local/mongodb/bin/mongod --config /etc/mongodb.cnf

.

The above is the detailed content of How to restart the process in linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn