For common process management tasks, top is so great because it gives an overview of the most active processes currently running (hence the name top). This enables you to easily find processes that might need attention. From top, you can also perform common process management tasks, such as adjusting the current process priority and killing processes.

[root@rhel7 ~]# top

top - :: up  min,   user,  load average: 0.00, 0.01, 0.05
Tasks: total, running, sleeping, stopped, zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : total, free, used, buff/cache
KiB Swap: total, free, used. avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
root S 0.0 0.4 :01.61 systemd
root S 0.0 0.0 :00.00 kthreadd
root S 0.0 0.0 :00.01 ksoftirqd/
root rt S 0.0 0.0 :00.00 migration/
root S 0.0 0.0 :00.00 rcu_bh
root S 0.0 0.0 :00.00 rcuob/
root S 0.0 0.0 :00.66 rcu_sched
root R 0.0 0.0 :00.30 rcuos/
root rt S 0.0 0.0 :00.02 watchdog/
root - S 0.0 0.0 :00.00 khelper
root S 0.0 0.0 :00.00 kdevtmpfs
root - S 0.0 0.0 :00.00 netns
root - S 0.0 0.0 :00.00 perf
root - S 0.0 0.0 :00.00 writeback
root - S 0.0 0.0 :00.00 kintegrityd
root - S 0.0 0.0 :00.00 bioset
root - S 0.0 0.0 :00.00 kblockd
root - S 0.0 0.0 :00.00 md
root S 0.0 0.0 :01.04 kworker/:
root S 0.0 0.0 :00.00 khungtaskd
root S 0.0 0.0 :00.00 kswapd0
root S 0.0 0.0 :00.00 ksmd
root S 0.0 0.0 :00.01 khugepaged
root S 0.0 0.0 :00.00 fsnotify_mark
root - S 0.0 0.0 :00.00 crypto
root - S 0.0 0.0 :00.00 kthrotld
root - S 0.0 0.0 :00.00 kmpath_rdacd
root - S 0.0 0.0 :00.00 kpsmoused
root - S 0.0 0.0 :00.00 ipv6_addrconf
root - S 0.0 0.0 :00.00 deferwq
root S 0.0 0.0 :00.00 kauditd
root - S 0.0 0.0 :00.00 ata_sff

Now that you know how to use the  kill  and  nice  commands from the command line, using the same functionality from top is even easier. From top, type  k . top will then prompt for the PID of the process you want to send a signal to. By default, the most active process is selected. After you enter the PID, top asks which signal you want to send. By default, signal 15 for SIGTERM is used. However, if you want to insist a bit more, you can type  9  for SIGKILL. Now press  Enter  to terminate the process.

To renice a running process from top, type  r . You are first prompted for the PID of the process you want to renice. After entering the PID, you are prompted for the nice value you want to use. Enter a positive value to increase process priority or a negative value to decrease process priority.

在top命令下kill和renice进程的更多相关文章

  1. top命令下的各种指标意义

    linux操作系统中top命令中各cpu含义: us 用户空间占用CPU百分比 sy 内核空间占用CPU百分比 ni 用户进程空间内改变过优先级的进程占用CPU百分比 id 空闲CPU百分比 wa 等 ...

  2. ps -aux 命令下的前几行内容解释 与 top命令下的前几行内容解释

    系统进程分为5种不同的状态: R(运行):正在运行或在运行队列中等待 S(中断):休眠中,在等待某个条件的形成或接受到信号 D(不可中断):收到信号不唤醒和不可运行.进程必须等待直到有中断发生 Z(僵 ...

  3. Linux下top命令监控性能状态

    1.性能分析因素:CPU.内存.网络.磁盘读写 2.系统对应的应用类型主要分为以下两种: IO Bound:一般都是高负荷的内存使用以及存储系统,IO范畴的应用就是一个大数据处理的过程:通常数据库软件 ...

  4. 『学了就忘』Linux系统管理 — 83、Linux中进程的查看(top命令)

    目录 1.top命令介绍 2.top命令示例 3.top命令输出项解释 4.top命令常用的实例 1.top命令介绍 top命令是用来动态显示系统中进程的命令. [root@localhost ~]# ...

  5. top命令如何列出所有进程

    今天在工作中遇到一个问题,想通过top命令来查看系统内所有进程,上网找到了办法记录下来. 命令:top -bn1

  6. Linux学习历程——Centos 7 top命令

    一.命令介绍 top 命令用于动态的监控进程活动与系统负载信息. 格式为 top [参数] 二.实例 直接运行top命令 top命令执行结果的前五行为系统整体的统计信息,代表含义如下: 第1行:系统时 ...

  7. top命令总结

    top命令主要用来观察和收集运行在系统上的进程的一些有用信息.ps只是一个快照,是ps命令执行的那一瞬间的系统中进程的快照.top则可以用于持续观察. 第一步,在命令行键入top,回车进入top管理界 ...

  8. 【linux】linux查看资源任务管理器,使用top命令 + 查看java进程下的线程数量【两种方式】

    ================================ 详解:https://blog.csdn.net/achenyuan/article/details/77867661 ======= ...

  9. top命令查看进程下线程信息以及jstack的使用

    转自:https://www.cnblogs.com/shengulong/p/8513652.html top -Hp pid可以查看某个进程的线程信息 -H 显示线程信息,-p指定pid jsta ...

随机推荐

  1. Java基础--说集合框架

    版权所有,转载注明出处. 1,Java中,集合是什么?为什么会出现? 根据数学的定义,集合是一个元素或多个元素的构成,即集合一个装有元素的容器. Java中已经有数组这一装有元素的容器,为什么还要新建 ...

  2. [转载]C++中 引用&与取地址&的区别

    一个是用来传值的 一个是用来获取首地址的 &(引用)==>出现在变量声明语句中位于变量左边时,表示声明的是引用.     例如: int &rf; // 声明一个int型的引用r ...

  3. js 获取页面高度和宽度(兼容 ie firefox chrome),获取鼠标点击位置

    <script> //得到页面高度 var yScroll = (document.documentElement.scrollHeight >document.documentEl ...

  4. Ecshop 数据库操作方法getRow、getAll、getOne区别

    ECShop没有使用一些开源的数据库操作类,比如adodb或者PEAR,而是封装了自己的实现.这样做的好处是实现非常轻量,大大减小了分发包的文件大小.另外,当网站需要做memcached缓存时,也可以 ...

  5. ACCESS中类型操作(限制、转换)

    ACCESS如何保留两位小数 1.可以通过修改表结构中字段的“小数位数”即可. 2.可以通过“更新查询”,将所有该字段的值更新为round(字段名,2) ACCESS如何转换类型 每个函数都可以强制将 ...

  6. Egret 入门

    居然使用 TyptScript... 先贴手册地址:http://www.typescriptlang.org/docs/tutorial.html. 先要接受一个诡异的写法: private loa ...

  7. block 高级

    //从后往前传值 声明block属性 //copy 目的是 将栈区的block拷贝一份到堆区 @property(nonatomic,copy)void (^sendValueBlock)(id); ...

  8. 【Hybrid App】一个产品经理眼中的PhoneGap Vs. AppCan

    首先在写这篇文章前,必须先申明一下,本人是技术出身,对HTML技术及手机客户端都有过编程经验,只是出于工作岗位的变动,便没有再具体代码工作,以下文章涉及的中间件的基本代码实现及前期的API使用,都是自 ...

  9. Spring Boot + Elasticsearch

    spring data elasticsearch elasticsearch 2.0.0.RELEASE 2.2.0 1.4.0.M1 1.7.3 1.3.0.RELEASE 1.5.2 1.2.0 ...

  10. MapReduce入门

    说明 MapReduce是一种分布式计算模型,解决海量数据的计算问题,主要有Map和Reduce组成 用户使用时需要实现map()和reduce()两个函数,两个函数的形参都是key/value键值对 ...