ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:22.32KB ,
资源ID:3973976      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3973976.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(linux top详解.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

linux top详解.docx

1、linux top详解TOP命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况。TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止.比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序;而且该命令的很多特性都可以通过交互式命令或者在个人定制文件中进行设定. top - 12:38:33 up 50 days, 23:15,7 users,load average: 60.58, 61.14,

2、 61.22Tasks: 203 total,60 running, 139 sleeping,4 stopped,0 zombieCpu(s): 27.0%us, 73.0%sy,0.0%ni,0.0%id,0.0%wa,0.0%hi,0.0%si,0.0%stMem:1939780k total,1375280k used,564500k free,109680k buffersSwap:4401800k total,497456k used,3904344k free,848712k cachedPID USERPRNIVIRTRESSHR S %CPU %MEMTIME+COMMAND

3、4338 oracle250627m 209m 207m R0 11.0 297:14.76 oracle4267 oracle250626m 144m 143m R67.689:16.62 oracle3458 oracle250672m 133m 124m R07.11283:08 oracle3478 oracle250672m 124m 115m R06.61272:30 oracle3395 oracle250672m 122m 113m R06.51270:03 oracle3480 oracle250672m 122m 109m R86.41274:13 oracle3399 o

4、racle250672m 121m 110m R06.41279:37 oracle4261 oracle250634m 100m99m R05.386:13.90 oracle25737 oracle250632m81m74m R04.3 272:35.42 oracle7072 oracle250626m72m71m R03.86:35.68 oracle16073 oracle250630m68m63m R83.6 175:20.36 oracle16140 oracle250630m66m60m R03.5 175:13.42 oracle16122 oracle250630m66m6

5、0m R03.5 176:47.73 oracle786 oracle250627m63m63m R03.41:54.93 oracle4271 oracle250627m59m58m R83.186:09.64 oracle4273 oracle250627m57m56m R83.084:38.20 oracle22670 oracle250626m50m49m R02.784:55.82 oracle一.TOP前五行统计信息统计信息区前五行是系统整体的统计信息。1.第一行是任务队列信息同uptime命令的执行结果:rootlocalhost # uptime13:22:30 up 8 mi

6、n,4 users,load average: 0.14, 0.38, 0.25其内容如下:12:38:33当前时间up 50days系统运行时间,格式为时:分1 user当前登录用户数load average: 0.06, 0.60, 0.48系统负载,即任务队列的平均长度。三个数值分别为1分钟、5分钟、15分钟前到现在的平均值(这三个一般会小于1,如果持续高于5,请仔细查看那个程序影响系统的运行)。2.第二、三行为进程和CPU的信息当有多个CPU时,这些内容可能会超过两行。内容如下:Tasks: 29 total进程总数1 running正在运行的进程数28 sleeping睡眠的进程数0

7、 stopped停止的进程数0 zombie僵尸进程数Cpu(s): 0.3% us用户空间占用CPU百分比1.0% sy内核空间占用CPU百分比0.0% ni用户进程空间内改变过优先级的进程占用CPU百分比98.7% id空闲CPU百分比0.0% wa等待输入输出的CPU时间百分比0.0% hiCPU服务于硬件中断所耗费的时间总额0.0% siCPU服务软中断所耗费的时间总额3.第四五行为内存信息。内容如下:Mem:191272k total物理内存总量173656k used使用的物理内存总量17616k free空闲内存总量22052k buffers用作内核缓存的内存量Swap:192

8、772k total交换区总量0k used使用的交换区总量192772k free空闲交换区总量123988k cached缓冲的交换区总量。内存中的内容被换出到交换区,而后又被换入到内存,但使用过的交换区尚未被覆盖,该数值即为这些内容已存在于内存中的交换区的大小。相应的内存再次被换出时可不必再对交换区写入。二.进程信息列名含义PID进程idPPID父进程idRUSERReal user nameUID进程所有者的用户idUSER进程所有者的用户名GROUP进程所有者的组名TTY启动进程的终端名。不是从终端启动的进程则显示为?PR优先级NInice值。负值表示高优先级,正值表示低优先级P最后

9、使用的CPU,仅在多CPU环境下有意义%CPU上次更新到现在的CPU时间占用百分比TIME进程使用的CPU时间总计,单位秒TIME+进程使用的CPU时间总计,单位1/100秒%MEM进程使用的物理内存百分比VIRT进程使用的虚拟内存总量,单位kb。VIRT=SWAP+RESSWAP进程使用的虚拟内存中,被换出的大小,单位kb。RES进程使用的、未被换出的物理内存大小,单位kb。RES=CODE+DATACODE可执行代码占用的物理内存大小,单位kbDATA可执行代码以外的部分(数据段+栈)占用的物理内存大小,单位kbSHR共享内存大小,单位kbnFLT页面错误次数nDRT最后一次写入到现在,被

10、修改过的页面数。S进程状态。 D=不可中断的睡眠状态 R=运行 S=睡眠 T=跟踪/停止 Z=僵尸进程COMMAND命令名/命令行WCHAN若该进程在睡眠,则显示睡眠中的系统函数名Flags任务标志,参考sched.htop的man命令解释如下:Listed below are tops available fields.They are always associated with thelettershown,regardlessof the position you may have established for them with theo (Order fields) intera

11、ctive command.Any field is selectable as the sort field, and you control whether they aresorted high-to-loworlow-to-high.Foradditionalinformation on sort provisions seetopic 3c. TASK Area Commands.a: PID-Process IdThe tasks unique process ID, which periodically wraps, though neverrestarting at zero.

12、b: PPID-Parent Process PidThe process ID of a tasks parent.c: RUSER-Real User NameThe real user name of the tasks owner.d: UID-User IdThe effective user ID of the tasks owner.e: USER-User NameThe effective user name of the tasks owner.f: GROUP-Group NameThe effective group name of the tasks owner.g:

13、 TTY-Controlling TtyThename of the controlling terminal.This is usually the device (serial port, pty, etc.) from which the process was started, and which it usesforinputoroutput.However,a task need not be associated with a terminal, in which case youll see ? displayed.h: PR-PriorityThe priority of t

14、he task.i: NI-Nice valueThe nice value of the task.Anegativenicevaluemeanshigherpriority, whereasapositive nice value means lower priority.Zero in this field simply means priority will not be adjusted in determining a tasks dispatchability.j: P-Last used CPU (SMP)A number representing the last used

15、processor.In a true SMPenvironmentthis will likely change frequently since the kernel intentionally uses weak affinity. Also, the very act of running top may break this weak affinityandcausemore processesto change CPUs more often (because of the extra demand for cpu time).k: %CPU-CPU usageThe tasks

16、share of the elapsed CPU time since the last screen update, expressed as a percentage of total CPU time.In a true SMP environment, if Irix mode is Off, top will operate in Solaris mode where a tasks cpu usage will be divided bythetotalnumberofCPUs.You toggle Irix/Solaris modes with the I interactive

17、 command.l: TIME-CPU TimeTotal CPU time the task has used since it started.WhenCumulativemodeis On,eachprocess is listed with the cpu time that it and its dead children has used.You toggle Cumulative mode with S, which is a command-line option and an interactive command.See the S interactive command

18、 for additional information regarding this mode.m: TIME+-CPU Time, hundredthsThe same as TIME, but reflecting more granularity through hundredths of a second.n: %MEM-Memory usage (RES)A tasks currently used share of available physical memory.o: VIRT-Virtual Image (kb)The total amount of virtual memo

19、ry used by the task.It includes all code, data and shared libraries plus pages that havebeenswappedout.(Note:youcan definethe STATSIZE=1 environment variable and the VIRT will be calculated from the /proc/#/state VmSize field.)VIRT = SWAP + RES.p: SWAP-Swapped size (kb)The swapped out portion of a t

20、asks total virtual memory image.q: RES-Resident size (kb)The non-swapped physical memory a task has used.RES = CODE + DATA.r: CODE-Code size (kb)The amount of physical memory devoted to executablecode,alsoknownasthetext resident set size or TRS.s: DATA-Data+Stack size (kb)Theamount of physical memor

21、y devoted to other than executable code, also known the data resident set size or DRS.t: SHR-Shared Mem size (kb)The amount of shared memory used by a task.Itsimplyreflectsmemorythat could be potentially shared with other processes.u: nFLT-Page Fault countThenumberofmajorpage faults that have occurr

22、ed for a task.A page fault occurs when a process attempts to read from or write to a virtual pagethatis notcurrentlypresentinits address space.A major page fault is when disk access is involved in making that page available.v: nDRT-Dirty Pages countThe number of pages that have been modified sinceth

23、eywerelastwrittento disk.Dirtypagesmustbe written to disk before the corresponding physical memory location can be used for some other virtual page.w: S-Process StatusThe status of the task which can be one of:D = uninterruptible sleepR = runningS = sleepingT = traced or stoppedZ = zombieTasks shown

24、 as running should be more properly thought of as ready to run-theirtask_struct is simply represented on the Linux run-queue.Even without a true SMP machine, you may see numerous tasks in this statedependingontops delay interval and nice value.x: Command-Command line or Program nameDisplay the comma

25、nd line used to start a task or the name of the associated program.You toggle between command line and name with c, which is bothacommand-line option and an interactive command. Whenyouvechosento display command lines, processes without a command line (like kernel threads) will be shown with only th

26、e program nameinparentheses, as in this example:( mdrecoveryd ) Eitherformofdisplay is subject to potential truncation if its too long to fit in this fieldscurrentwidth.Thatwidthdependsuponotherfieldsselected, their order and the current screen width.Note: The Command field/column is unique, in that it is not fixed-width.Whe

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1