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. 你好,C++(10)这次的C++考试你过了没有?C++中表示逻辑判断的布尔数据类型

    3.4  布尔类型 在日常生活中,我们除了需要使用int类型的变量表示216路公交车:需要使用float类型的变量表示西红柿3.5元一斤,有时候还需要表示一种数据,那就是逻辑状态: “这次的C++考试 ...

  2. Android学习----打印日志Log

    Log.v(tag,msg);所有内容 Log.d(tag,msg);debug Log.i(tag,msg);一般信息 Log.w(tag,msg);警告信息 Log.e(tag,msg);错误信息 ...

  3. 【jquery学习笔记】关于$(window),$("html,body").scroll()的在不同浏览器的不同反应

    已经很几次碰到了这种问题, 例子: $(window).scroll(function(){ var num=$(window).scrollTop();              //之前的写法是$ ...

  4. Rabbitmq init terminating in do boot 问题

    其实出现这个问题的原因很简单,就是rabbitmq的安装目录中是不能带空格的,但是官方安装包会默认的将我们的程序安装到Program Files下,哭晕啊有没有.所以,我们将rabbitmq从D:\P ...

  5. C#编写的序列化通用类代码

    using System; using System.IO; using System.IO.Compression; using System.Runtime.Serialization.Forma ...

  6. 用JvisualVM监视远程tomcat

    在tomcat的catcalina.sh 中java_opts 环境变量中添加以下参数: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmx ...

  7. COJ 0343 WZJ的公司(二)

    传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=313 试题描述: WZJ的公司放假了!为了保证假期期间公司的安全,WZJ决定 ...

  8. dos 下 注册win 组件 ocx 后缀的

    C:\WINDOWS\system32>regsvr32 NTGraph.ocx

  9. wxWidgets搜索事件处理函数顺序

    详细参见:使用wxWidgets进行跨平台程序开发 (王强 译) 实例: class MyFrame:public wxFrame { public: MyFrame() { wxButton* bu ...

  10. Mutex — Windows API

    Mutex是互斥体的意思,当一个线程持有一个Mutex时,其它线程申请持有同一个Mutex会被阻塞,因此可以通过Mutex来保证对某一资源的互斥访问(即同一时间最多只有一个线程访问).调用Create ...