在linux使用 ps命令的输出只是系统执行命令那一刻的快照信息,为了能够连续地观察进程的实时状态信息以及其他系统信息,可以使用更top命令,如下是一个top命令的截图:
top命令输出的前面5行是系统运行状态的汇总信息:
1)其中第一行包括系统的当前时间(13:13:04),自linux操作系统启动运行以来累计运行时间(48分钟),目前登录到linux操作系统的用户数(1个),以及系统运行在最近1分钟,5分钟和15分钟内系统运行队列的平均长度。
2)第二行是关于进程的统计信息,包括系统中现有进程的总数(127),当前正在运行的进程数量(1),处于休眠状态的进程数量(126),处于暂停状态的进程数量(0),处于僵尸状态的进程数量(0)。
3)第三行是关于CPU的统计信息,CPU处于用户模式(0.3),CPU处于系统模式(0.3),CPU处理其优先级经nice值调整过的用户进程的时间量所占百分比(0),CPU处于空闲状态(99.3),CPU处于等待I/O状态(0),CPU处理硬件中断状态(0),CPU处理软件中断状态(0),CPU处理st(Steal Time)状态(0)。
4)第四行是关于内存的统计信息,系统配置的物理内存总量(102468KB),已用内存数量(422744KB),空闲内存数量(597724KB),用作缓冲区的内存数量(11524KB)。
5)第五行是关于交换区的统计信息,系统配置的交换区总量(102920KB),已用交换区数量(1000KB),空闲交换区数量(1019920KB),用作缓冲区的交换区数量(178912KB)。
关于CPU处理st(Steal Time)状态的说明:
IBM’s definition of steal time is actually pretty good:
Steal time is the percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor.
So, relatively speaking, what does this mean?
A high steal percentage may mean that you may be outgrowing your virtual machine with your hosting company. Other virtual machines may have a larger slice of the CPU’s time and you may need to ask for an upgrade in order to compete. Also, a high steal percentage may mean that your hosting company is overselling virtual machines on your particular server. If you upgrade your virtual machine and your steal percentage doesn’t drop, you may want to seek another provider.
A low steal percentage can mean that your applications are working well with your current virtual machine. Since your VM is not wrestling with other VM’s constantly for CPU time, your VM will be more responsive. This may also suggest that your hosting provider is underselling their servers, which is definitely a good thing.
相关推荐
Linux top 命令详解 Linux top 命令详解 Linux top 命令详解
linux top命令源码 top命令相当windows的任务管理器,查看资源使用状况。
Linux Top命令参详解Linux Top命令参详解Linux Top命令参详解Linux Top命令参详解
linux top命令详解 linux top命令详解
Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux常用命令Linux...
Linux常用命令大全整理,需要找的时候用Ctrl+F查找组合键!
linuxTOP命令简介
Linux下游top命令查看内存使用情况,Windows平台下没有top命令,topshow工具就是个人制作的Windows平台下的top工具,不妨试一试。
linux下top命令参数解释 linux下top命令参数解释
全网最新整理linux常用命令列举/全网最新整理linux常用命令列举全网最新整理linux常用命令列举全网最新整理linux常用命令列举全网最新整理linux常用命令列举全网最新整理linux常用命令列举全网最新整理linux常用命令...
Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 Linux命令大全 ...
本文定位:想通过python调用top命令获取cpu使用率但暂时没有思路的情况。 如果单纯为了获得cpu的利用率,通过top命令重定向可以轻松实现,命令如下: 复制代码 代码如下: top -bi > cpuHistory.log 或 复制代码 代码...
比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序;而且该命令的很多特性都可以通过交互式命令或者在个人...
top命令经常用来监控linux的系统状况,比如cpu、内存的使用,程序员基本都知道这个命令,但比较奇怪的是能用好它的人却很少,下面通过WEB服务器的top监控截图,讲述top视图中的各种数据的含义,还包括视图中各进程...
linux解压命令linux解压命令linux解压命令
linux常用命令整理,很棒! linux常用命令整理,很棒! linux常用命令整理,很棒! linux常用命令整理,很棒!
linux 实用命令整理linux 实用命令整理linux 实用命令整理linux 实用命令整理
对一些常用的Linux命令进行整理
常用的Liunx命令集合,我精心整理的,对平时的工作帮助很大
linux命令linux命令linux命令linux命令linux命令linux命令linux命令linux命令linux命令linux命令