1、w/uptime 查看系统负载
[root@server01~]#w##分别为1分钟,5分钟,15分钟的负载 17:35:58up5:30,1user,loadaverage:0.00,0.01,0.05 USERTTYFROMLOGIN@IDLEJcpuPcpuWHAT rootpts/0gateway17:326.00s0.26s0.12sw [root@server01~]#uptime 17:36:02up5:30,0.05
[root@server01~]#cat/proc/cpuinfo processor:0##表示只有1个逻辑cpu vendor_id:GenuineIntel cpufamily:6 model:58 modelname:Intel(R)Core(TM)i5-3230Mcpu@2.60GHz stepping:9 microcode:0x1b cpuMHz:2593.839 cachesize:3072KB physicalid:0 siblings:1 coreid:0 cpucores:1 apicid:0 initialapicid:0 fpu:yes fpu_exception:yes cpuidlevel:13 wp:yes flags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsmmxfxsRSSesse2sssyscallnxrdtscplmconstant_tscarch_perfmonpebsbtsnoplxtopologytsc_reliablenonstop_tscaperfmperfeagerfpupnipclmulqdqssse3cx16pcidsse4_1sse4_2x2apicpopcntxsaveavxf16crdrandhypervisorlahf_lmidaaratepbplnptsdthermfsgsbasesmepxsaveopt bogomips:5188.23 clflushsize:64 cache_alignment:64 addresssizes:40bitsphysical,48bitsvirtual powermanagement:
3、vmstat 监控系统状态
[root@server01~]#vmstat procs-----------memory-------------swap-------io-----system--------cpu----- rbswpdfreebuffcachesisobiboincsussyidwast 200749284876150960006115180010000 [root@server01~]#vmstat15##1秒显示1次,一共显示5次 procs-----------memory-------------swap-------io-----system--------cpu----- rbswpdfreebuffcachesisobiboincsussyidwast 200749284876150960006115180010000 000749268876150960000020230010000 00074926887615096000001614019900 000749268876150960000022250010000 000749268876150960000019140010000
�参数解读:
r run,运行中的进程数
b block,卡死状态
swpd swap中的进程数(影响si,so)
si 有多少kb的数据从swap进入内存中
so 有多少kb的数据从内存中进入swap中
bi 从磁盘出来进入内存,读
bo 从内存出来进入磁盘,写
us 用户占用资源百分比(us + sy + id =100)
wa wait,等待cpu的进程百分比
4、top 查看进程使用资源情况
[root@server01~]#top##动态显示,3秒1次 top-17:57:23up5:51,0.05 Tasks:82total,2running,80sleeping,0stopped,0zombie %cpu(s):0.3us,0.0sy,0.0ni,99.7id,0.0wa,0.0hi,0.0si,0.0st KiBMem:1008392total,748360free,107540used,152492buff/cache KiBSwap:2097148total,2097148free,0used.735044availMem #RES表示物理内存大小# PIDUSERPRNIVIRTRESSHRS%cpu%MEMTIME+COMMAND 3root200000S0.30.00:00.07ksoftirqd/0 21root200000S0.30.00:17.59kworker/0:1 1root20012809267083952S0.00.70:01.87systemd 2root200000S0.00.00:00.01kthreadd ...... [root@server01~]#top-c##显示详细的进程信息 top-17:59:12up5:53,0.05 Tasks:83total,1running,82sleeping,0zombie %cpu(s):0.0us,100.0id,748164free,107680used,152548buff/cache KiBSwap:2097148total,0used.734864availMem PIDUSERPRNIVIRTRESSHRS%cpu%MEMTIME+COMMAND 21root200000S0.30.00:17.73[kworker/0:1] 2619root20015760422041608R0.30.20:00.01top-c ...... [root@server01~]#top-bn1##静态显示 top-18:00:22up5:54,0.1sy,99.8id,748316free,107528used,0used.735016availMem PIDUSERPRNIVIRTRESSHRS%cpu%MEMTIME+COMMAND 1root20012809267083952S0.00.70:01.87systemd 2root200000S0.00.00:00.01kthreadd 3root200000S0.00.00:00.07ksoftirqd/0 6root200000S0.00.00:00.36kworker/u128:0 ......
5、sar 系统活动情况
[root@server01~]#yuminstall-ysysstat ...... 已安装: sysstat.x86_640:10.1.5-11.el7 作为依赖被安装: lm_sensors-libs.x86_640:3.4.0-4.20160601gitf9185e5.el7 完毕! [root@server01~]#sar-nDEV##网卡流量 Linux3.10.0-514.el7.x86_64(server01)2017年07月10日_x86_64_(1cpu) 18时10分02秒IFACErxpck/stxpck/srxkB/stxkB/srxcmp/stxcmp/srxmcst/s 18时20分01秒lo0.000.000.000.000.000.000.00 18时20分01秒ens330.180.110.020.010.000.000.00 平均时间:lo0.000.000.000.000.000.000.00 平均时间:ens330.180.110.020.010.000.000.00 23时01分06秒LINUXRESTART [root@server01~]#sar-nDEV13##每隔1秒显示一次,一共显示3次 Linux3.10.0-514.el7.x86_64(server01)2017年07月10日_x86_64_(1cpu) 23时06分46秒IFACErxpck/stxpck/srxkB/stxkB/srxcmp/stxcmp/srxmcst/s 23时06分47秒lo0.000.000.000.000.000.000.00 23时06分47秒ens331.011.010.060.180.000.000.00 23时06分47秒IFACErxpck/stxpck/srxkB/stxkB/srxcmp/stxcmp/srxmcst/s 23时06分48秒lo0.000.000.000.000.000.000.00 23时06分48秒ens331.011.010.060.400.000.000.00 23时06分48秒IFACErxpck/stxpck/srxkB/stxkB/srxcmp/stxcmp/srxmcst/s 23时06分49秒lo0.000.000.000.000.000.000.00 23时06分49秒ens331.001.000.060.400.000.000.00 平均时间:IFACErxpck/stxpck/srxkB/stxkB/srxcmp/stxcmp/srxmcst/s 平均时间:lo0.000.000.000.000.000.000.00 平均时间:ens331.011.010.060.330.000.000.00 [root@server01~]#sar-q##系统负载 Linux3.10.0-514.el7.x86_64(server01)2017年07月10日_x86_64_(1cpu) 18时10分02秒runq-szplist-szldavg-1ldavg-5ldavg-15blocked 18时20分01秒11000.000.010.050 平均时间:11000.000.010.050 23时01分06秒LINUXRESTART [root@server01~]#sar-b##磁盘读写 Linux3.10.0-514.el7.x86_64(server01)2017年07月10日_x86_64_(1cpu) 18时10分02秒tpsrtpswtpsbread/sbwrtn/s 18时20分01秒0.070.000.070.000.86 平均时间:0.070.000.070.000.86 23时01分06秒LINUXRESTART [root@server01~]#sar-f/var/log/sa/sa10##历史文件,每10分钟保存一次 Linux3.10.0-514.el7.x86_64(server01)2017年07月10日_x86_64_(1cpu) 18时10分02秒cpu%user%nice%system%iowait%steal%idle 18时20分01秒all0.010.000.090.000.0099.90 平均时间:all0.010.000.090.000.0099.90 23时01分06秒LINUXRESTART [root@server01~]#
6、nload实时网络流量
[root@server01~]#yuminstall-ynload 已安装: nload.x86_640:0.7.4-4.el7 完毕! [root@server01~]#nload##通过左右方向键切换网卡 Deviceens33[192.168.137.100](1/2): ================================================================= Incoming: ...... Outgoing: #############################################Curr:78.50MBit/s #############################################Avg:16.47MBit/s #############################################Min:4.13kBit/s #############################################Max:98.17MBit/s #############################################Ttl:318.58MByte原文链接:https://www.f2er.com/centos/376842.html