1.ps命令
ps命令用于查看系统中的进程状态,格式为“ps [参数]”。
参数 作用
-a 显示所有进程(包括其他用户的进程)
-u 用户以及其他详细信息
-x 显示没有控制终端的进程

linux系统中有常见的5种进程状态,分别是R运行、S中断(休眠,等待触发)、D不可中断(kill也不能中断)、Z僵死(进程已终止,但进程描述存在,直到父进程调用wait4()系统函数后将其释放)、T停止。
第五天#打卡-linux-ps、top、ifconfig、uname、uptime、free、history等命令
2.top 命令
用于动态监测进程活动和负载状态
第五天#打卡-linux-ps、top、ifconfig、uname、uptime、free、history等命令
第一行:系统时间、运行时间、登入终端数、系统负载值(1分钟、5分钟、15分钟)
第二行:进程总数、正在运行的进程数、休眠的进程数、停止的进程数、僵死的进程数
第三行:占用CPU百分比、系统内核占用百分比、改变过优先级进程占用资源百分比
第四行:物理内存总量、内存使用量、空闲内存量、作为内核缓存的内存量
第五行:虚拟内存总量、虚拟内存使用量、虚拟内存空闲量、已被提前加载的内存量

3.ifconfig
用于获取网卡配置信息和网络状态等信息,格式“ifconfig[网络设备[参数]”
第五天#打卡-linux-ps、top、ifconfig、uname、uptime、free、history等命令
4.uname
用于查看系统内核和系统版本等信息,格式“uname [-a]”
[[email protected] ~]# uname -a
Linux local.domian.com 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)

5.free第五天#打卡-linux-ps、top、ifconfig、uname、uptime、free、history等命令
6.uptime
uptime用于查看系统的负载信息,格式为uptime。
uptime显示当前系统时间、系统已运行时间、启用终端数量以及平均负载值等信息。平均负载值指的是系统在最近1分钟、5分钟、15分钟内的压力情况(下面加粗的信息部分);负载值越低越好,尽量不要长期超过1,在生产环境中不要超过5。
第五天#打卡-linux-ps、top、ifconfig、uname、uptime、free、history等命令
7.history
history命令用于显示历史执行过的命令,格式为“history [-c]”。
第五天#打卡-linux-ps、top、ifconfig、uname、uptime、free、history等命令
如果需要清空当前用户在本机上执行过的命令历史信息,可执行如下命令:
history -c

以上内容摘自:[linux]

相关文章: