当前位置:网站首页>Processes and Scheduled Tasks
Processes and Scheduled Tasks
2022-08-09 08:09:00 【small glimmer】
View progress
A single-core, single-threaded CPU can run multiple multi-threaded applications, but it takes time to slowly load resource processing tasks
Controlling Process
D: Daemon
R: Running
S: Sleep state
Z: Zombie state
Priority:
<: high priority
N: low priority
l: The process is multithreaded
+: foreground process
ctrl-c is to send a SIGINT signal to terminate a process
ctrl-z is to send a SIGSTOP signal to suspend a process.Put the job in the background (pause)
ctrl-d does not send a signal, but a special binary value, which means EOF.Represents input completion or logout
ps -elf #will display process information in the system in long format
-e: Display all process information in the system.
-1: Display process information in long format.
-f: Display process information in full format.
Explanation of each column:
F: The system flag assigned to the process by the kernel.
S: The state of the process.
UID: The user who started these processes.
PID: Process ID of the process.
PPID: Process ID of the parent process (if the process is started by another process)
C: CPU utilization during the lifetime of the process.
PRI: The priority of the process (the higher the number, the lower the priority).
NI: The humility value is used to determine the priority.
ADDR: The memory address of the process.
SZ:If the process is swapped out, the approximate size of the required swap space.
WCHAN: If the process is sleeping, display the name of the system function in sleep.
STIME: The system time when the process was started.
TTY: The terminal device when the process starts. pts/0255 represents the virtual terminal, usually the terminal connected remotely; tty1tty7 represents the local console terminal
TIME: The cumulative CPU time required to run the process.
CMD: The start command of the process.
Zombie process:
A process ends, but if the parent process of the process has already ended first, then the process will not become a zombie process, because when each process ends, the system will scan the current systemFor all the processes running in the process, see if any process is a child process of the process that has just ended. If so, Init will take over it and become its parent process. After the child process exits, init will reclaim the related occupiedresource.However, when the child process ends before the parent process, and the parent process does not recycle the child process and release the resources occupied by the child process, the child process will become a zombie process.
pstree -aup username→this user must be activated to view the process
& indicates that the process is running in the background, the user can continue to execute other command operations, and can enter fg to bring the process to the foreground
crtl +z just suspends the process (calls it into the background and stops execution), but it is not cleared, you can enter kill -9 process number, and then send a signal to clear the process.
bg can resume tasks that are suspended in the background (such as crtl +z suspended) and continue to execute in the background
fg can restore background tasks to the foreground
jobs -l can view the process ID and then enter kill -9+ process ID to clear the job
killall -9 + task name
at one-time task settings
crontab periodic task settings
crontab -eScheduled periodic writes
crontab -l lists scheduled tasks
The minute is any integer from 0 to 59
The hour is any integer from 0 to 23
The date is any integer from 1 to 31
The month value is any integer from 1 to 12
The week value is any integer from 0 to 7, 0 or 7 represents Sunday
The command or program script to be executed by the command
Special representation of time values
- Represents any time within the range
, represents multiple discrete time points in the interval
- represents a continuous time range
/ specifies the time frequency of the interval
边栏推荐
- libtorch示例
- 网络层协议介绍
- IO byte stream reads text Chinese garbled
- ssh:connect to host master port 22:Network is unreachable
- H3C_利用策略路由实现出口双线路负载(选路)的部署
- Solidworks 2022 Inspection新增功能:光学字符识别、可自定义的检查报告
- 主键id,Snowflake雪花算法,优点:生成有顺序的id,提高数据库的性能
- SOLIDWORKS 2022新功能直播揭秘!速来围观!
- Collection 接口 & List 接口
- LeetCode·每日一题·761.特殊的二进制序列·分治
猜你喜欢
随机推荐
HOOPS是什么?这4款3D软件开发工具包你还不知道?
SSM integration development case
Collection 接口 & List 接口
Introduction to the Endpoint
SOLIDWORKS 2022新功能直播揭秘!速来围观!
系统安全及应用
Talking about Flask_script
VRRP原理及配置
IP地址及子网划分
Four departments including the Ministry of Industry and Information Technology promote green smart home products to the countryside
3D软件开发工具HOOPS全套产品开发介绍 | HOOPS Exchange、HOOPS Communicator
The story of the disappearing WLAN of Windows 10 computers
如何生成dll文件 采用VS2017生成dll文件(动态库文件)和lib文件(静态库文件)以C语言为例
I'm here to advertise
LeetCode: 876. The middle node of the linked list —— simple
环形链表问题(判环、求入口点)
monitor textbox input
File Handling (IO)
CUDA和cuDNN 安装10.0版本
Use of prepareStatement