15-2linux进程和内存管理15-3进程状态和相关概念15-4进程管理工具(计划任务)15-5性能相关工具

一、利用管道文件实现IPC

[root@centos8 ~]#mkfifo /date/tmp.fifo
[root@centos8 ~]#ll /date/tmp.fifo 
[root@centos8 ~]#echo hello > /date/tmp.fifo 
[root@centos8 ~]#ll /date/tmp.fifo 
查找文件
[root@centos8 ~]#find / -type f



加锁 lock

二、进程管理相关工具

[root@centos8 ~]#pstree -p 进程树
[root@centos8 ~]#ps a 显示每个终端的进程
[root@centos8 ~]#ps -a显示当前终端进程

  [root@centos8 ~]#uptime   负载查询
  16:29:30 up 17:35, 1 user, load average: 0.16, 0.06, 0.01
  [root@centos8 ~]# iotop可以产看磁盘那个进程消费多

[root@centos8 ~]#iftop -n   显示网络带宽使用情况 需要安装iftop包
interface: eth0
IP address is: 10.0.0.150
MAC address is: 00:0c:29:17:e4:b8
[root@centos8 ~]#nload                      查看网络实时吞吐量  需要安装nload包

[root@centos8 ~]#yum -y install iptraf-ng   网络监视工具

[root@centos8 ~]#yum -y install dstat      系统资源统计dstat

[root@centos8 ~]#yum -y install glance     远程监控glance

[root@centos8 ~]# htop

[root@centos8 ~]#tail -f /var/log/messages  使用文件

[root@centos8 ~]#lsof | grep messages  查看被访问的文件,误删除可以找回只能找回被打开的文件

[root@centos8 ~]#ll /proc/917/fd 查看位置  fd是文件描述符  cat /proc/917/fd/5 > /root/messages

 单机web管理linux

[root@centos8 ~]#yum -y install cockpit
[root@centos8 ~]#systemctl  enable --now cockpit.socket
[root@centos8 ~]#ss -ntl    启用9090端口

 

posted @ 2023-06-21 10:56  最拉的刺客  阅读(10)  评论(0)    收藏  举报