当前位置:网站首页>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
边栏推荐
- Commonly used functions -- spineros:: and spineros::)
- Land cover / use data product download
- Logic regression principle and code implementation
- 2022江西光伏展,中國分布式光伏展會,南昌太陽能利用展
- [appium] write scripts by designing Keyword Driven files
- Laser slam theory and practice of dark blue College Chapter 3 laser radar distortion removal exercise
- Operation of 2022 mobile crane driver national question bank simulation examination platform
- 2022 judgment questions and answers for operation of refrigeration and air conditioning equipment
- 关于gcc输出typeid完整名的方法
- The method of changing a value in the array and a value in the object of wechat applet
猜你喜欢
极致体验,揭晓抖音背后的音视频技术
[appium] write scripts by designing Keyword Driven files
Open source key component multi_ Button use, including test engineering
Land cover / use data product download
YOLOv4剪枝【附代码】
Dry goods | how to extract thumbnails quickly?
Go对文件操作
JS get link? The following parameter name or value, according to the URL? Judge the parameters after
2022 Shanghai safety officer C certificate operation certificate examination question bank and simulation examination
k8s之实现redis一主多从动态扩缩容
随机推荐
2022年上海市安全员C证操作证考试题库及模拟考试
Halo open source project learning (II): entity classes and data tables
587. Install fence / Sword finger offer II 014 Anagrams in strings
Arithmetic expression
C byte array (byte []) and string are converted to each other
C language array processing batch data
Summary of floating point double precision, single precision and half precision knowledge
31. Next arrangement
油猴网站地址
JS interview question: FN call. call. call. Call (FN2) parsing
云原生虚拟化:基于 Kubevirt 构建边缘计算实例
关于gcc输出typeid完整名的方法
SystemVerilog (VI) - variable
C language loop structure program
Land cover / use data product download
239. Maximum value of sliding window (difficult) - one-way queue, large top heap - byte skipping high frequency problem
JS get link? The following parameter name or value, according to the URL? Judge the parameters after
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
MySQL进阶之索引【分类,性能分析,使用,设计原则】
2022年茶艺师(初级)考试模拟100题及模拟考试