当前位置:网站首页>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
边栏推荐
- Minecraft 1.16.5 module development (50) guide book
- Label the picture below the uniapp picture
- 记录开发过程中无法使用管理员身份修改系统文件问题
- Experiment 1: comprehensive experiment [process on]
- Next initializesecuritycontext failed: unknown error (0x80092012) - the revocation function cannot check whether the certificate is revoked.
- 年轻人搞副业有多疯狂:月薪3000,副业收入3W
- Assembly learning register
- QT elementary notes
- QT msvc2015 compiler reports an error: error: lnk1158: unable to run "rc.exe"
- Basic knowledge of compiling learning records
猜你喜欢

Raspberry pie 4B Getting Started Guide

Application of stack -- using stack to realize bracket matching (C language implementation)

app quits unexpectedly

Idea running run and services

C language implements sequential queue, circular queue and chain queue

Starting MySQL ERROR! Couldn‘t find MySQL server (/usr/local/mysql/bin/mysqld_safe)

Local unloading traffic of 5g application

Pit stepping record: Supervisor log return information: redis extension is not installed

期末複習-PHP學習筆記6-字符串處理

Pool de Threads - langage C
随机推荐
next InitializeSecurityContext failed: Unknown error (0x80092012) - 吊销功能无法检查证书是否吊销。
Cmake generate map file
Linu foundation - zoning planning and use
线程池——C语言
Stepper motor
The simulation interface does not declare an exception and throws an exception
实验一、综合实验【Process on】
QT wmic command obtains some hardware information
动态内存管理
网络安全-ARP协议和防御
MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
Minecraft 1.16.5模组开发(五十) 书籍词典 (Guide Book)
C language - student achievement management system
Qtcreator debug code after configuring CDB debugger view variable value display card
Parameter calculation of deep learning convolution neural network
网络安全-单臂路由、DHCP中继和ICMP协议
Experiment 1: comprehensive experiment [process on]
Keil plug-in Usage Summary
Nested if statement in sum function in SQL Server2005
1.someip introduction