第七篇 Linux相关(2)-进程管理与性能分析

进程管理相关命令

进程启动

1
2
nohup --用于在系统后台不挂断地运行命令
& --放在命令后,表示后台执行

进程查看

1
2
3
4
5
6
7
ps -aux --显示进程状态
top --实时显示进程状态
pstree --树状图展示进程关系
nice --调整进程优先级
pidof --查询进程PID
kill --终止进程
killall --终止某服务名称对应的所有进程

历史命令

1
2
history --显示执行过的命令历史
!编码数字 --重复执行某一次的命令

性能分析

系统状态

1
2
3
4
uname --查看系统内核版本与系统架构,详细系统版本使用cat /etc/redhat-release
uptime --查看系统的负载信息
free --显示当前系统中内存的使用量信息
who --查看当前登入主机的用户终端信息

网络状态

1
2
3
ifconfig --查看网卡配置和网络状态ifconfig
ping --测试主机之间的网络连通性
netstat --显示如网络连接、路由表、接口状态等的网络相关信息

时间

1
2
3
date -- 显示当前日期
date "+%Y-%m-%d %H:%M:%S" --以给定格式显示日期
date "+%j" --今年第几天

第七篇 Linux相关(2)-进程管理与性能分析

http://yoursite.com/2021/07/09/linux-1/

Author

s-serenity

Posted on

2021-07-09

Updated on

2021-08-29

Licensed under

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.