top命令

Easter79
• 阅读 620

top命令

显示进程所占的系统资源

每隔3秒变1次。把占用系统资源最高的进程放到最前面。

[root@localhost ~]# top
top - 03:56:02 up  3:46,  2 users,  load average: 0.05, 0.03, 0.05
Tasks: 105 total,   1 running, 103 sleeping,   1 stopped,   0 zombie
%Cpu(s):  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  1867048 total,  1513124 free,   156416 used,   197508 buff/cache
KiB Swap:  2097148 total,  2097148 free,        0 used.  1522536 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND        
  1368 root      20   0       0      0      0 S   0.3  0.0   0:14.74 kworker/0:0    
     1 root      20   0  128164   6828   4056 S   0.0  0.4   0:01.65 systemd        
     2 root      20   0       0      0      0 S   0.0  0.0   0:00.03 kthreadd       
     3 root      20   0       0      0      0 S   0.0  0.0   0:00.07 ksoftirqd/0    
     5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H   
     6 root      20   0       0      0      0 S   0.0  0.0   0:00.24 kworker/u256:0 
     7 root      rt   0       0      0      0 S   0.0  0.0   0:00.01 migration/0    
     8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh         
     9 root      20   0       0      0      0 S   0.0  0.0   0:01.95 rcu_sched      
    10 root      rt   0       0      0      0 S   0.0  0.0   0:00.10 watchdog/0     
    11 root      rt   0       0      0      0 S   0.0  0.0   0:00.10 watchdog/1     
    12 root      rt   0       0      0      0 S   0.0  0.0   0:00.01 migration/1    
    13 root      20   0       0      0      0 S   0.0  0.0   0:00.07 ksoftirqd/1    
    15 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:0H   
    17 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs      
    18 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 netns          
    19 root      20   0       0      0      0 S   0.0  0.0   0:00.00 khungtaskd     
    20 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 writeback      
    21 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kintegrityd    
    22 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 bioset         
    23 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kblockd  

关注:RES这一项为进程所占内存的大小。

%MEM为使用内存的百分比。

nload 命令  监控网卡流量

出现错误如下所示:

[root@localhost ~]# yum install -y nload
已加载插件:fastestmirror
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - "Failed connect to mirrorlist.centos.org:80; 没有到主机的路由"


 One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64
点赞
收藏
评论区
推荐文章
blmius blmius
2年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Jacquelyn38 Jacquelyn38
2年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
Wesley13 Wesley13
2年前
4、jstack查看线程栈信息
1、介绍利用jps、top、jstack命令找到进程中耗时最大的线程,以及线程状态等等,同时最后还可以显示出死锁的线程查找:FoundoneJavaleveldeadlock即可1、jps获得进程号!(https://oscimg.oschina.net/oscnet/da00a309fa6
Stella981 Stella981
2年前
Linux CPU使用率查询
1\.top命令下面详细介绍它的使用方法。top01:06:48up1:22,1user,loadaverage:0.06,0.60,0.48Tasks:29total,1running,28sleeping,0stopped,0zombieC
Wesley13 Wesley13
2年前
Java日期时间API系列36
  十二时辰,古代劳动人民把一昼夜划分成十二个时段,每一个时段叫一个时辰。二十四小时和十二时辰对照表:时辰时间24时制子时深夜11:00凌晨01:0023:0001:00丑时上午01:00上午03:0001:0003:00寅时上午03:00上午0
Wesley13 Wesley13
2年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
2年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
2年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
3个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这
Easter79
Easter79
Lv1
今生可爱与温柔,每一样都不能少。
文章
2.8k
粉丝
5
获赞
1.2k