Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The process depends on how the graphical tool is viewed.

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Definition of process

1. What is a process?

The program is placed in the storage media (such as hard disk, CD, floppy disk, tape, etc.) and exists in the form of physical files.

Process: after the program is triggered, the permissions and properties of the executor, the program code and the required data will be loaded into memory, and the operating system will give the unit in memory an identification code, so to speak, a process is a running program.

two。 Process status

R process is running

S the program is currently asleep, but can be awakened

D can not be awakened sleep state, the process may be waiting for Igamo

T stop state, which may be in the work control or debugging state

Z zombie state, the program has been terminated but cannot be removed out of memory (mainly because it can be caused by a programming error)

View the process

1 > drawing viewing process

2 > process View Command: gnome-system-monitor

Ps-An all processes

-a processes in the current environment do not contain environmental information

-U displays process information

A displays the processes running in the current environment, including environment information

X list all running tty output devices in the system

F displays the parent-child relationship of the process (similar to having nodes)

E displays the details of the process (system resource calls)

Common combinations of ps

Ps aux displays all processes in the system and displays the user

Ps ef displays process details and lists the parent-child relationship of the process

Ps ax displays all processes in the current system

Pstree displays the process tree of the current system

Display process assignment information

Ps-o xxx displays process assignment information

Comm process name

User all process groups

% cpu process cpu utilization

% men process memory utilization

Pid process Id

The nice process has priority

4 process sorting

Ps ax-- sort=+%cpu | -% cpu (- large to small + small to large)

Information displayed in stat

S process status

L there is lock space in memory

N priority is low

< 优先级高 前台运行 s 顶级进程 5.进程优先级 1.优先级范围 -20-19 2.优先级查看 ps ax -o pid,ni 3.指定某个优先级开启进程 nice -n 数字 进程Pid nice -n -5 vim &开启vim并指定程序的优先级为-5 4.改变进程优先级 renice -n 优先级进程的pid 注意:nice与renice的区别,nice在之后改变权限,renice应提前设定好,在再次调用时就会改变 5.环境中进程前后台的调用 jobs 查看被打入环境后台的进程 ctrl+z 把占用终端的进程打入后台 fg jobs 把后台的进程调回前台 bg jobs 把后台暂停的进程运行 comm & 让命令直接在后台运行 6.进程信号常用的信号优先级 1 进程加载重配置 可以在服务器端口重新配置时,不用重新加载 2 删除进程在内存中的数据 3 删除鼠标在内存中的数据 9 强制结束单个进程(不能被阻塞) 15 正常关闭进程 18 运行暂停的进程 19 暂停某个进程(不能被阻塞) 20 把进程打入后台(可能被阻塞) man 7 signal 查看信号详细信息 kill -信号 进程Pid killall -信号 进程名字 pkill -u student -信号 7.进程动态监控 top 1 显示cpu每个核的负载 s 调整刷新频率 c cpu负载排序 m 内存使用排序 h 查看帮助 u 查看指定用户进程 k 对指定用户进程发起信号 q 退出 控制服务:systemctl 系统初始化进程 pstree 显示系统的进程树 1.进程控制命令 ssh ------->

Sshd

Client server

Systemctl service control command

Systemctl status sshd view service status, inactive (not available), active (available)

Systemctl start sshd enables the service.

Systemctl stop sshd shuts down the service

Systemctl restart sshd restart service

Systemctl reload sshd reload service

Systemctl enable sshd configuration service boot startup

Systemctl disable sshd sets the service to boot and not start

Systemctl list-units lists the enabled service status

Systemctl list-units-files lists the startup status of all services

Systemctl set-default multi-user.target sets the system boot level to multi-user mode (no graphics)

Systemctl list-dependencies lists dependencies for services

Systemctl set-default graphical.target sets the system boot level to graphic mode

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report