当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
ssh:connect to host master port 22:Network is unreachable
897. 增加订单搜索树
scp upload file to remote server
练习电影卡片、过渡、动画、变形、旋转,练习时钟、立方体、缩放
3安装及管理程序
.net(四) 数据层实现
Collection 接口 & List 接口
Solidworks 2022 Inspection新增功能:光学字符识别、可自定义的检查报告
.net(二) 配置数据库
Exclude null values when Oracle limits
SQL存储过程
2019 Nanchang Internet Competition Question C, Hello 2019
引导过程与服务控制
nvm安装以及管理多版本node教程
Redis(七) 主从复制(二)哨兵模式
Four departments including the Ministry of Industry and Information Technology promote green smart home products to the countryside
进程同步与互斥问题纠错
eTS UI开发学习
.net(一)WebService创建
App测试