一、监控服务器CPU及内存等:
1、top:
*top - 21:18:55:当前系统时间;
*50 days:系统已经运行了50天了;
*2 users:当前登录2个用户;
*load average:系统负载,即任务队列的平均长度;
*Tasks:total总进程数、running正在运行的进程数、sleeping睡眠的进程数、stopped停止的进程数、zombie冻结的进程数;
*%Cpu(s):us用户空间占用CPU百分比、sy内核空间占用CPU百分比、ni用户进程空间内改变过优先级的进程占用CPU百分比、id空闲CPU百分比、wa等待输入输出的CPU时间百分比···
*Mem:total物理内存总量、free空闲的物理内存总量、used使用的物理内存总量、buff/cache用作内核缓存的内存量;
*Swap:total交换区总量、free空闲的交换区总量、used使用的交换区总量···

2、htop:top的加强版本,1 2 是因为服务器是双核CPU;

3、nmon:


4、vmstat:显示关于进程,内存,页,块I/O,traps和CPU的信息。
*procs进程:
r:等待执行时间的进程数;
b:在不可中断睡眠中的进程数。
*memory内存:
swpd:已使用的虚拟内存量;
free:空闲内存量;
buff:作为缓冲的内存;
cache:作缓存的内存;
*swap交换区:
si:从交换分区写到内存的大小;
so:从内存写到交换分区的大小
*IO输入输出:
bi:发往块设备的数目(blocks/s);
bo:从块设备接收的块数目 (blocks/s)
*system系统:
in:每秒钟的中断次数,包括时钟;
cs:每秒的上下文切换次数
*CPU(总CPU时间的百分比):
us:运行非内核代码的时间(用户时间,包括nice时间);
sy:运行内核代码的时间(系统时间)
id:空闲时间,早先的Linux2.5.41版本,包含了I/O等待时间
wa:等待IO的时间,早先的Linux2.5.41版本,这个值为0

5、mpstat:

6、free:
-b,-k,-m,-g :以字节b,千字节kb,兆字节mb和吉字节gb为单位展示;
-l :显示详细的高低内存统计;
-c :输出free的次数

二、监控服务器磁盘:i/o输入输出
1、df -h:查看磁盘的使用情况:

2、iotop、iostat···
三、监控服务器网络:参考命令nload\iftop\speedometer···

网友评论