Linux信息系统相关命令

  • 查看进程及关闭进程命令

1、通过ps命令查看mysql进程:ps  -aux   | grep  mysql

2、通过top命令查看当前系统中CPU占用前三的进程:top    按shift+p

3、通过kill命令杀死进程:kill    -9     进程号

 

  • 查看系统监听端口

查端口、进程号:netstat  -anptu  |  grep  mysql

根据端口查看进程号:lsof -i : 22

  • 查看日志信息

实时查看(>重定向对文件产生的影响):tail  -f

1、不停向文件写入内容:ping www.baidu.com > temp.txt

2、实时查看:tail   -f    temp.txt

posted @ 2023-11-13 14:28  MrLuyu  阅读(19)  评论(0)    收藏  举报