访问手机版  

Linux常用命令|Linux培训学习|考试认证|工资待遇与招聘,认准超级网工!

招聘|合作 登陆|注册

网络工程师培训

当前位置:网络工程师 > 技术课程 > linux > 热点关注 > linux常用命令

(4)top详解 (每周一个linux命令系列)

时间:2019-08-16

linux命令大全软件_linux命令大全_linux命令大全应用

linux命令 top详解

引言:今天的命令是用来看cpu信息的top

我们先看man top


top - display Linux processes

翻译:显示linux进程信息

linux命令大全_linux命令大全应用_linux命令大全软件

具体的描述如下:


The  top  program provides a dynamic real-time view of a running sys‐
       tem.  It can display system summary information as well as a list  of
       processes  or  threads  currently  being managed by the Linux kernel.
       The types of system summary information shown and  the  types,  order
       and  size of information displayed for processes are all user config‐
       urable and that configuration can be made persistent across restarts.
       The program provides a  limited  interactive  interface  for  process
       manipulation  as well as a much more extensive interface for personal
       configuration  --  encompassing every aspect of its  operation.   And
       while  top  is  referred to throughout this document, you are free to
       name the program anything you  wish.   That  new  name,  possibly  an
       alias,  will then be reflected on top's display and used when reading
       and writing a configuration file.
       

翻译如下:

top命令提供一个运行中系统的动态实时视图,它可以显示系统摘要信息以及由linux内核管理的的进程或线程的列表。系统概要信息的类型被显示出来,类型、顺序为进程显示的信息大小都是用户配置的。可以通过重新启动使配置持久化。

该程序为进程操作提供有限的交互式界面。并为个人配置提供了更广泛的接口 - 涵盖了其操作的各个方面。 虽然本文档中提到了toplinux命令大全,但你可以随意命名该程序。 该新名称(可能是别名)将反映在top的显示界面上,并在读取和写入配置文件时使用。

linux命令大全应用_linux命令大全软件_linux命令大全

我们再来看一下命令执行结果

top - 17:00:43 up 12 days,  1:13,  3 users,  load average: 6.27, 3.04, 2.31
Tasks: 444 total,   3 running, 441 sleeping,   0 stopped,   0 zombie
%Cpu(s): 19.0 us,  4.7 sy,  0.0 ni, 75.1 id,  1.1 wa,  0.0 hi,  0.2 si,  0.0 
KiB Mem : 16131568 total,   926512 free,  8862288 used,  6342768 buff/cache
KiB Swap:  8191996 total,  8191900 free,       96 used.  5994096 avail Mem 
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND  
 5297 nobody    20   0  283588  20388   5372 R   9.3  0.1   9:25.75 php-fpm  
23312 nobody    20   0  372584  21660   6272 S   9.3  0.1  14:31.92 php-fpm  
23325 nobody    20   0  353288  13676   4916 R   9.3  0.1  14:55.50 php-fpm  
......
 上一个教程:touch命令详解