




已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一.TOP前五行统计信息统计信息区前五行是系统整体的统计信息。1.第一行是任务队列信息同uptime命令的执行结果:rootlocalhost # uptime13:22:30 up 8 min,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分钟前到现在的平均值。2.第二、三行为进程和CPU的信息当有多个CPU时,这些内容可能会超过两行。内容如下:Tasks: 29 total进程总数1 running正在运行的进程数28 sleeping睡眠的进程数0 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% hi0.0% si3.第四五行为内存信息。内容如下:Mem:191272k total物理内存总量173656k used使用的物理内存总量17616k free空闲内存总量22052k buffers用作内核缓存的内存量Swap:192772k total交换区总量0k used使用的交换区总量192772k free空闲交换区总量123988k cached缓冲的交换区总量。内存中的内容被换出到交换区,而后又被换入到内存,但使用过的交换区尚未被覆盖,该数值即为这些内容已存在于内存中的交换区的大小。相应的内存再次被换出时可不必再对交换区写入。二.进程信息列名含义PID进程idPPID父进程idRUSERReal user nameUID进程所有者的用户idUSER进程所有者的用户名GROUP进程所有者的组名TTY启动进程的终端名。不是从终端启动的进程则显示为?PR优先级NInice值。负值表示高优先级,正值表示低优先级P最后使用的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最后一次写入到现在,被修改过的页面数。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) interactive 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.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: 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 the 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 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 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 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 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 memory 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 tasks 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 memory 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 occurred 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 sincetheywerelastwrittento 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 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 command 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 the 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.When displayed, this column will be allocated all remaining screen width (uptothe maximum512characters)toprovide for the potential growth of program names into command lines.y: WCHAN-Sleeping in FunctionDepending on the availability of the kernel link map (System.map), thisfield willshowthename or the address of the kernel function in which the task is currently sleeping.Running tasks will display a dash (-) in this column.Note: By displaying this field, tops own working set will be increased byover 700Kb.Youronlymeans of reducing that overhead will be to stop and restarttop.z: Flags-Task FlagsThis column represents the tasks current scheduling flags whichareexpressed inhexadecimalnotation and with zeros suppressed.These flags are officially documented in .Less formal documentation can also befoundon the Fields select and Order fields screens.默认情况下仅显示比较重要的PID、USER、PR、NI、VIRT、RES、SHR、S、%CPU、%MEM、TIME+、COMMAND列。2.1用快捷键更改显示内容。(1)更改显示内容通过f键可以选择显示的内容。按f键之后会显示列的列表,按a-z即可显示或隐藏对应的列,最后按回车键确定。(2)按o键可以改变列的显示顺序。按小写的a-z可以将相应的列向右移动,而大写的A-Z可以将相应的列向左移动。最后按回车键确定。按大写的F或O键,然后按a-z可以将进程按照相应的列进行排序。而大写的R键可以将当前的排序倒转。设置完按回车返回界面。三.命令使用详细内容可以参考MAN帮助文档。这里列举部分内容:命令格式:top - d p q c C Sn参数说明:d:指定每两次屏幕信息刷新之间的时间间隔。当然用户可以使用s交互命令来改变之。p:通过指定监控进程ID来仅仅监控某个进程的状态。q:该选项将使top没有任何延迟的进行刷新。如果调用程序有超级用户权限,那么top将以尽可能高的优先级运行。S:指定累计模式s:使top命令在安全模式中运行。这将去除交互命令所带来的潜在危险。i:使top不显示任何闲置或者僵死进程。c:显示整个命令行而不只是显示命令名在top命令的显示窗口,我们还可以输入以下字母,进行一些交互:帮助文档如下:Help for Interactive Commands - procps version 3.2.7Window 1:Def: Cumulative mode Off.System: Delay 4.0 secs; Secure mode Off.Z,BGlobal: Z change color mappings; B disable/enable boldl,t,mToggle Summaries: l load avg; t task/cpu stats; m mem info1,IToggle SMP view: 1 single/separate states; I Irix/Solaris modef,o. Fields/Columns: f add or remove; o change display orderF or O. Select sort field. Move sort field: next col rightR,H. Toggle: R normal/reverse sort; H show threadsc,i,S. Toggle: c cmd name/line; i idle tasks; S cumulative timex,y. Toggle highlights: x sort field; y ru
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- HCy-Lyso-生命科学试剂-MCE
- 2025年甘肃省大数据中心招聘工作人员考前自测高频考点模拟试题完整参考答案详解
- GSK-J4-Standard-生命科学试剂-MCE
- 2025年橡塑专用仪器项目合作计划书
- 2025安徽合力股份有限公司校园招聘模拟试卷附答案详解(典型题)
- 我的特别礼物写物作文7篇
- 2025年大型并网风力发电机组发电机合作协议书
- 文档管理流程及归档工具模板
- 2025广东省第二中医院招聘内分泌科医师1人考前自测高频考点模拟试题附答案详解(考试直接用)
- 员工培训与评估综合工具
- 2025年医师三基考试试题及答案(上半年)
- 《彩虹》课件 部编版语文二年级上册
- 基孔肯雅热主题班会课件
- 2025年全国企业员工全面质量管理知识竞赛试题及答案
- 锁骨下盗血综合征伴锁骨下动脉闭塞的护理查房
- 磷化铝管理办法
- 水下激光探测-洞察及研究
- 2025年海底捞企业面试题及答案
- 小学体育家长会课件
- 7.2 量身高(课件)-2025-2026学年三年级数学上册北师大版
- 教育的人口功能
评论
0/150
提交评论