当前位置:网站首页>Processes, jobs, and services
Processes, jobs, and services
2022-06-30 07:29:00 【My deep blue】
process 、 Operations and services
process 、 Homework
1、PID: Process ID ( Each new process has a unique PID)
2、PPID: Parent process ID
3、 Any process can create a child process
4、 stay redhat 7 above , The parent of all processes : systemd, stay redhat 5. 6 in , The parent of all processes : init
- process
process :LInux Independent programs that run on their own
Interactive process : By a shell Qi Dynamic process , It can be run in the foreground , It can also run in the background
Batch process : It's a sequence of processes , No contact with the terminal
Monitor progress ( Daemon ) :Linux When the system starts , The process started , And run it in the background
- Homework
Homework : An executing process , And jobs can contain one or more processes .
Operation control : Control the behavior of running processes . Such as : Suspend a process 、 It will be implemented later 、 interrupt , In this way, users can switch between multiple jobs
- View live processes top
top
Parameters
-d: Number of seconds , Appoint top The command is updated every few seconds . The default is 3 second
stay top Commands that can be executed in command interaction mode :
~? or h: Display help for interactive mode
P: With CPU Usage sort , This is the default
M: Sort by memory usage
N: With PID Sort
q: sign out top
- View the process tree pstree
pstree
Parameters
-p: Show progress PID
-u: Show users of the process
- . Look at the processes running in the background
jobs
// View the current background process status
jobs -l: In addition to listing the process number , Also list PID
jobs -r: List processes that only run in the background
jobs -S: List processes that are only suspended in the background
ps -aux: List all processes and states
ps -ef: List all processes
ps -l: List the processes and states related to the current user
ps -u: user name : View the process status of a user
ps -j: List PID \ SPID
Parameter interpretation ps -aux Inquire about

1、%CPU: The amount of CPU Usage rate
2、%MEM: Occupied memory usage ,
3、VSZ: Occupied by the virtual memory size
4、RSS: Occupied by memory size
5、TTY: The secondary device number of the terminal (minor device numberoftty)
6、STAT: The state trip
7、START Start Time travel
8、TIME: Execution time
9、COMMAND: Instruction executed
START Process status
Running :
R: The process is running or waiting to run
sleep :
S: Sleeping but can be awakened
D: Sleeping , And cannot be awakened , The process was interrupted , May cause abnormal state of the equipment
K: Sleeping , And cannot be awakened , The process can be interrupted .
Has stopped :
T: The process was stopped , But it can be restored through other processes
T: The process being debugged
Stiff stop :
Z: The child process signals the parent process when it exits , except PID Outside , All resources are released
X: The parent process gets the structure of the child process , Child processes can be released completely , This state is not visible in the process
START Priority of process status
<: High priority
n: Low priority
s: Include subprocesses
+: Process groups in the background
- interrupt 、 Kill process
The signal : Pass to Linux Process operation
kill-l PID : The display can be passed to Linux All signals of the process
ctrl +c : Interrupt process
ctrl +z : Suspend process
kill -9 PID : Force to kill a process
kill -15 PID : Terminate a process in the normal way
- Control command of operation
&: Use this symbol after the command , Commands can be executed in the background
fg + Job number : Transfer the background command to the foreground to continue execution , Can't put it back in the background
bg + Job number : Continue the command suspended in the background
Control services and daemons
ssh: It's an agreement
sshd: It's a process
systemd: Is the parent of all processes (Linux kernel 3.0 Above version )
systemctl: Users manage various types of systemd object , These objects are called : unit
Common units ::.service ( Service unit ) .socket ( Socket ) .path ( Path unit )
systemctl start sshd
start: Start in the system - - Item service
stop: Wait for the procedure to be processed before stop,
restart: The direct closing program is on
reload: Reload the configuration file , Process halted , Then load the configuration file , Continue with follow-up . Process PID No change
enable: Set power on self start
disable: Turn off and start automatically
status: View the status of a unit
- systemctl status sshd.service Query parameters

loaded: Unit configuration file to handle
active (running) : Running
active (exited) : Configuration is successful
active
(waiting) : Running , But waiting for events
inactive: It's not running
enable: Boot up
disabled: Power on does not start automatically
static: Can't start , But it can be started by a unit that has been started
边栏推荐
- [resolved] error 1290 (HY000): unknown error 1290
- Video player (I): process
- Basic knowledge of compiling learning records
- Cmake generate map file
- [introduction to Expo application] v Expert recommendation letter template
- SwiftUI打造一款美美哒自定义按压反馈按钮
- How to batch modify packaging for DXP schematic diagram
- Stepper motor
- uniapp图片下方加标签标图片
- MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
猜你喜欢

Basic knowledge of compiling learning records

Ad usage notes

网络安全-ARP协议和防御

Implementation of double linked list in C language

视频播放器(二):视频解码

动态内存管理

Sublime text 3 configuring the C language running environment

Double click the idea to solve the problem of downloading again

C language - student achievement management system

Nested if statement in sum function in SQL Server2005
随机推荐
Next initializesecuritycontext failed: unknown error (0x80092012) - the revocation function cannot check whether the certificate is revoked.
期末複習-PHP學習筆記6-字符串處理
Stm32g0 Tim interrupt use
Dynamic memory management
SwiftUI打造一款美美哒自定义按压反馈按钮
28 rounds of interviews with 10 companies in two and a half years
手机开户股票开户安全吗?开户需要准备什么?
Binary tree related operations (based on recursion, implemented in C language)
Realization of dissolve effect in unity and its principle analysis
Cubemx completes STM32F103 dual serial port 485 transceiver transmission
1285_ Expand macros defined by AUTOSAR functions and variables with scripts to improve readability
Implementation of double linked list in C language
Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
Win10 step pit - power on 0xc0000225
How to quickly delete routing in Ad
Application of stack -- using stack to realize bracket matching (C language implementation)
记录开发过程中无法使用管理员身份修改系统文件问题
Binary tree traversal
Ad\dxp how to solve the problem of not knowing the schematic Library
Write and run the first go language program