当前位置:网站首页>Process management command
Process management command
2022-04-23 17:57:00 【*Flowers bloom on the street】
process : One is in progress ( function ) The program ( Dynamic )
Program : It consists of one instruction after another
Process by operating system management
pcb Process control block ( Store the attribute information of the process ) struct task_struct;
int pid Unique identification of the process Process id Number
The process consists of three states : be ready function Blocking
The difference between program and process :
1、 A program is an ordered collection of instructions , It's a static concept , Its ability has no meaning of operation . A process is an execution of a program on a processor , It's a dynamic concept .
2、 The program can be stored as a kind of software data for a long time , The process has a certain life cycle , It can produce and die dynamically .
3、 A process is a unit that can run independently , Can work in parallel with other processes .
4、 Process is the basic unit that competes for the limited resources of computer system , It is also the basic unit for processor scheduling . The program has no such concept .
5、 There is no one-to-one correspondence between processes and programs . Different processes can contain the same program , Multiple processes can also be generated during the execution of the same program .
6、 A program is an ordered collection of instructions recorded on a medium , The process is controlled by the program 、 Data and process control blocks 3 Part of it is made up of .
One 、ps Check the process bash command interpreter
which See where the program is located
ps By default, only Current terminal Process in (ppid The parent process id, The parent process produces a child process )
ps -e View all process information
ps -A View all process information
ps -f See more processes
ps -ef See more details
ps -L Displays the linearity of the process ID
pstree Print out the displayed process information in the form of tree view
shell Is the general term of command interpreter ,(eg: Student ) bash One of the command interpreters (eg: Zhang San . Li Si )
Two 、kill end ( Kill ) process
( To end a process, you need to know the of the process pid Number )(kill Send semaphores to the process )
kill pid Number ( Programs running in the background and foreground can kill )
ctrl+c( Can only kill the foreground running )
-9(-SIGKILL) Force the end of a process
-STOP Suspend a process ( Actively suspend the execution of the process ,CPU No longer allocate resources to this process )
sleep sleep ( Commands are executed one by one ,sleep After execution, the next program can be executed )
for example : We're going to end sleep 200 This process , We need to know its pid( You can find it at another terminal pid), End it again
3、 ... and 、 Stop the process ( Stop the process , But don't end it )
ctrl+z
Four 、jobs Check the system backstage Running commands ( Displays the tasks of the current terminal )
5、 ... and 、 Force kill process
kill -9 pid Number
6、 ... and 、pkill End process by name
End a group of processes with the same name
pkill Process name
pkill -9 Process name ( End of the mandatory )
7、 ... and 、 & Running programs in the background
command &
command &
The default command is executed in the foreground , Only one at a time , The next... Cannot be executed until the previous one is executed
Programs running in the background can only use kill Kill ,Ctrl+c Cannot end a program running in the background
8、 ... and 、 The foreground task is transferred to the background
bg % task number
Nine 、 The task is transferred from the background to the foreground
fg % task number
Ten 、top View system resource usage and process information
( amount to windows Task manager )
Select the process number and press f Displays detailed information about the selected process
Press q sign out
11、 ... and 、 User management command
版权声明
本文为[*Flowers bloom on the street]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230547207523.html
边栏推荐
- 587. 安装栅栏 / 剑指 Offer II 014. 字符串中的变位词
- 油猴网站地址
- 列表的使用-增删改查
- Submit local warehouse and synchronize code cloud warehouse
- Where is the configuration file of tidb server?
- cartographer_ There is no problem compiling node, but running the bug that hangs directly
- Classification of cifar100 data set based on convolutional neural network
- MySQL advanced index [classification, performance analysis, use, design principles]
- Using files to save data (C language)
- Future usage details
猜你喜欢
Laser slam theory and practice of dark blue College Chapter 3 laser radar distortion removal exercise
Fashion classification case based on keras
SystemVerilog (VI) - variable
Land cover / use data product download
Examination question bank and online simulation examination of the third batch (main person in charge) of special operation certificate of safety officer a certificate in Guangdong Province in 2022
1217_ Generating target files using scons
C1小笔记【任务训练篇一】
MySQL 中的字符串函数
Go file operation
MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】
随机推荐
Error in created hook: "referenceerror:" promise "undefined“
C# 的数据流加密与解密
Yolov4 pruning [with code]
Encapsulate a timestamp to date method on string prototype
122. The best time to buy and sell stocks II - one-time traversal
土地覆盖/利用数据产品下载
Amount input box, used for recharge and withdrawal
587. 安装栅栏 / 剑指 Offer II 014. 字符串中的变位词
Remember using Ali Font Icon Library for the first time
Open source key component multi_ Button use, including test engineering
2021 Great Wall Cup WP
Leak detection and vacancy filling (VIII)
Go语言JSON包使用
2022江西光伏展,中国分布式光伏展会,南昌太阳能利用展
Tell the truth of TS
极致体验,揭晓抖音背后的音视频技术
C byte array (byte []) and string are converted to each other
Romance in C language
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
386. Dictionary order (medium) - iteration - full arrangement