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. 【BZOJ1010】玩具装箱

    Description P教授要去看奥运,但是他舍不下他的玩具,于是他决定把所有的玩具运到北京.他使用自己的压缩器进行压缩,其可以将任意物品变成一堆,再放到一种特殊的一维容器中.P教授有编号为1... ...

  2. 动态内存分配(new)和释放(delete)

    在之前我们所写过的程序中,所必需的内存空间的大小都是在程序执行之前就已经确定了.但如果我们需要内存大小为一个变量,其数值只有在程序运行时 (runtime)才能确定,例如有些情况下我们需要根据用户输入 ...

  3. javaScript高程第三版读书笔记

    看完<dom编程艺术>现在准备读进阶版的js高程了,由于篇幅较长,所以利用刚看完<dom编程艺术>学到的知识写了段JavaScript代码,来折叠各章的内容.并且应用到了< ...

  4. .net别样外观控件包DotNetBar

    内容介绍:http://www.componentcn.com/?thread-6423-1.html BubbleBar应用: BubbleBar, DevComponents.    Namesp ...

  5. [PHP学习日志]简单Session的使用

    首先,给出一些Session的解释:目前最实用的网络协议即HTTP超文本传输协议,它是“无状态”的,所谓“无状态”是指它在用户与服务器交互时没有存储需要交互的“状态”.而Session 是在网络应用中 ...

  6. JQUERY1.9学习笔记 之基本过滤器(九) 小于选择器

    小于选择器 jQuery( ":lt(index)" ) jQuery( ":lt(-index)" ) 描述:选择所有小于指定下标的元素. <!DOCT ...

  7. 编写可维护的javascript代码---开篇(介绍自动报错的插件)

    文章开篇主要推荐了2款检测编程风格的工具: JSLint和JSHint: jsLint是由Douglas Crockford创建的.这是一个通用的javascript代码质量检测工具,最开始JSLin ...

  8. 代码发布架构方案(SVN)

    问题: 安装优化软件环境nginx,lvs  程序代码(不断更新) 配置更新(不断变更) 1.SVN介绍 1.1 什么是SVN(Subversion)?         SVN(Subversion) ...

  9. CONTEXT MENU简介

    安卓中的上下文菜单是通过长按控件元素触发的,要注意的是每次都会触发onCreateContextMenu方法: main.xml <?xml version="1.0" en ...

  10. C51-keil编译常见错误和警告处理53

    keil错误:C51编译器识别错类型有三种:1.致命错误:伪指令控制行有错,访问不存在的原文:2.语法及语义错误:语法和语义错误都发生在原文件:3.警告:警告出现并不影响目标文件的产生,但执行:C_5 ...