In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to remove unnecessary processes in the Linux system", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to eliminate unnecessary processes in the Linux system" this article.
1. Kill
Function: kill the process according to the process number
Usage: kill [signal code] process ID
For example:
[root@localhost ~] # ps auxf | grep httpd
Note: kill-9 to force termination of exit
Give an example
[root@localhost ~] # ps aux | grep gaim
Or
[root@localhost] # pgrep-l gaim 5031 gaim 5031 gaim [root@localhost] # kill-9 5031
Special usage:
Kill-STOP [pid]
Send SIGS***7,19,23) to stop a process without the Linux operating system killing the process.
Kill-CONT [pid]
Send SIGCONT (19, 18, 25) to restart a stopped process.
Kill-KILL [pid]
Sending a SIGKILL (9) forces the process to stop immediately and does not perform a cleanup operation.
Kill-9-1
Terminate all processes you have.
2. Killall
Function: kill all processes directly through the name of the program
Usage: the name of the program that killall is running
For example:
Note: this command can use the-9 parameter to forcibly kill the process.
3. Pkill
Function: kill all processes directly through the name of the program
Usage: # name of the program that pkill is running
For example:
[root@localhost beinan] # pgrep-l gaim 2979 gaim [root@localhost beinan] # pkill gaim
4. Xkill
Purpose: a program that kills the desktop graphical interface.
Example of an application scenario: when firefox crashes and cannot exit, you can kill firefox with a mouse click.
When the xkill runtime comes out and the personal brain bone icon, which graphics program crashes a little bit will OK.
If you want to terminate xkill, right click to cancel
Call method:
[root@localhost ~] # xkill
◆ Note:
KILLALL
NAME (name)
Killall-Linux operating system kills processes by name
SYNOPSIS (Overview)
Killall [- egiqvw] [- signal] name...
Killall-l
Killall-V
DESCRIPTION (description)
Killall sends a signal to all processes that run any given command. If no signal name is specified, SIGTERM.
The signal can be specified by name (such as-HUP) or number (such as-1). Signal 0 (check whether a process exists) can only be specified digitally.
If the command name includes a slash (/), the process executing that particular file will be killed, regardless of the process name.
If there is no process to kill for the listed command, killall returns a non-zero value. If at least one process is killed for each command, killall returns 0. The Killall process will never kill itself (but it can kill other killall processes).
OPTIONS (option)
-e for very long names, exact matching is required. If a command name is longer than 15 characters, you may not be able to use the entire name (overflow). In this case, killall kills all processes that match the first 15 characters of the name. With the-e option, such records will be ignored. If the-v option is also specified, killall prints a message for each ignored record.
-g kills processes that belong to this process group. Kill signals are sent only once to each group, even if there are multiple processes in the same process group.
-I interactive way to ask for confirmation before the Linux operating system kills the process.
-l lists all known signal names.
-Q if there is no process to kill, no complaint will be made.
-v reports whether the signal was sent successfully.
-V displays version information.
-W wait for all the killing processes to die. Killall checks every second to see if any killed processes still exist and returns only when they are dead. Note: if the signal is ignored or does not work, or if the process stays in a zombie state, the killall may wait.
FILES (related documents)
The location where the / proc proc file system exists.
KNOWN bugS (known BUGS)
Killing as a file only works on executables that have been open during execution, that is, mixed executables cannot be killed in this way.
A warning is that typing killall name may not produce the desired effect on non-Linux operating systems, especially when privileged users execute.
Between scans, if the process disappears and is replaced by a new process with the same PID, killall-w cannot detect it.
The above is all the contents of the article "how to remove unnecessary processes in the Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.