当前位置:网站首页>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
边栏推荐
- [solved] failed! Error: Unknown error 1130
- 線程池——C語言
- Qtcreator debug code after configuring CDB debugger view variable value display card
- Detailed methods for copying local computer files to virtual machine system
- The maximum expression in Oracle database message list is 1000 error
- Golan common shortcut key settings
- STM32 register
- How to determine the size of the platform byte order?
- Idea running run and services
- DXP shortcut key
猜你喜欢

Resolution: div failed to get keyboard event

Ad usage notes

Introduction to go project directory structure

Parameter calculation of deep learning convolution neural network

The maximum expression in Oracle database message list is 1000 error

Vs2019 and SQL

期末复习-PHP学习笔记11-PHP-PDO数据库抽象层.

Examen final - notes d'apprentissage PHP 6 - traitement des chaînes

视频播放器(一):流程

网络安全-抓包和IP包头分析
随机推荐
Basic knowledge of system software development
Local unloading traffic of 5g application
套接字socket编程——UDP
Stm32g0 and FreeRTOS learning summary
Idea running run and services
DS1302 digital tube clock
解决:div获取不到键盘事件
String application -- string violent matching (implemented in C language)
将本地电脑文件复制到虚拟机系统中详细方法
视频播放器(二):视频解码
Keil serial port redirection
QT msvc2015 compiler reports an error: error: lnk1158: unable to run "rc.exe"
Nested if statement in sum function in SQL Server2005
PMIC power management
Error reporting record
我今年毕业,但我不知道我要做什么
Final review -php learning notes 11-php-pdo database abstraction layer
4diac getting started example
[resolved] MySQL exception: error 1045 (28000): unknown error 1045, forgetting the initial password
uniapp图片下方加标签标图片