当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
The Martian - Simple Math Problems
【无标题】
火星人 --简单的数学题
CUDA和cuDNN 安装10.0版本
Buns make up the number----Euclide+dp
Forest Program DFS + tanjar cactus
C#基础学习
IO byte stream reads text Chinese garbled
文件处理(IO)
Servlet详解
Shell--常用小工具(sort、uniq、tr、cut)
Analysis that may result in a savecount of 0 in Loadrunner checkpoints
Servlet的实现原理解析(serverapplet)(服务端程序)
转换为onnx模型错误汇总
系统安全及应用
NAT地址转换的原理与配置
LeetCode: 876. The middle node of the linked list —— simple
2019 Nanchang Internet Competition Question C, Hello 2019
三层交换机原理及配置
Use of prepareStatement









