Total Pageviews

Saturday, 6 October 2018

Linux上的*top工具

Linux 下有很多 *top 工具,收集一番:
apachetop
atop
biotop
cachetop
ctop
dnstop
filetop
gtop
hatop
htop
iftop
iotop
itop
jnettop
kerneltop
latencytop
logtop
lttngtop
mtop
mytop
ntop
numatop
pgtop
powertop
ptop
qtop
radeontop
slabratetop
slabtop
sntop
systemd-cgtop
tcptop
tiptop
top
treetop
virt-top
wmtop
xrestop
Glances

apachetop

ApacheTop watches a logfile generated by Apache (in standard common or combined logformat, and generates human-parsable output in realtime.
读取Apache 的日志,实时分析,生成统计数据。Nginx 也有一个GoAccess,更加酷炫.

atop

项目地址:www.atoptool.nl
和top 很像,不过强大一些,有不同的视图,内存、命令、磁盘、网络等,具体可以看截图
为了分析进程的网络使用情况,atop 带了一个内核模块netatop:
The optional kernel module netatop can be loaded to gather statistics about the TCP and UDP packets that have been transmitted/received per process and per thread.

biotop

biotop - Block device (disk) I/O by process top.
biotop 是iovisor/bcc 项目里一段Python 脚本,代码见:bcc/tools/biotop.py
使用说明:bcc/tools/biotop_example.txtbiotop-bpfcc.8

cachetop

show Linux page cache hit/miss statistics including read and write hit % per
展示Linux page cache 的命中情况,脚本地址:bcc/tools/cachetop.py,使用说明:bcc/tools/cachetop_example.txt

ctop

Top-like interface for container metrics
ctop 用来在宿主机上统计、获取docker container CPU/内存/网络等指标,比较新的项目,非常酷炫。
项目地址:ctop.sh

dnstop

dnstop - displays various tables of DNS traffic on your network
监听网卡,抓包,统计分析DNS 相关的流量,可以用来分析本机出去的DNS 查询请求,也可以在DNS 服务器上分析入的查询请求。 项目地址:dnstop

filetop

filetop shows reads and writes by file, with process details.
展示进程对每个文件(包括普通文件,socket,管道等)的读写次数、读写量。filetop 和 cachetop、biotop一样,都是iovisor/bcc 这个项目中的脚本。
脚本地址:bcc/tools/filetop.py,使用说明:bcc/tools/filetop_example.txt

gtop

System monitoring dashboard for terminal.
一个用Node.JS 写的系统仪表盘,没什么特殊,项目地址:aksakalli/gtop

hatop

HATop is an interactive ncurses client and real-time monitoring, statistics displaying tool for the HAProxy TCP/HTTP load balancer.
可以用于HAProxy 的分析工具,应该是基于HAProxy 提供的socket api 开发的,除了流量、状态统计,还可以开关server 节点、更改权重等,项目地址:feurix.org/projects/hatop/

htop

This is htop, an interactive process viewer for Unix systems. It is a text-mode application (for console or X terminals) and requires ncurses.
非常厉害,非常强大,非常酷炫的top 替代品,居家旅行必备,值得拥有,项目地址:hisham.hm/htop/

iftop

iftop - display bandwidth usage on an interface by host
iftop 是一个实时监控网络流量的工具,可以非常方便的看到连接的来源与目的、端口、接收/发送速度等信息,项目地址:www.ex-parrot.com/~pdw/iftop/

iotop

iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on
用iotop 可以看到每个进程具体的IO,类似top 的页面,能很方便的找出是哪些进程在占用磁盘IO,项目地址:guichaz.free.fr/iotop/

itop

itop 是一个perl 脚本,统计各个中断源的中断次数,项目地址:kargig/itop

jnettop

jnettop - View hosts/ports taking up the most network traffic
nethogs 可以用来监控进程消耗的带宽,而 jnettop 则使用来记录每个 IP 的带宽的使用情况。
用户手册:jnettop(8) ,项目地址已经无法打开。

kerneltop

来源:asciinema.org
shows kernel function usage in an interactive style like 'top'
统计展示内核函数调用次数,使用手册:kerneltop.1

latencytop

LatencyTOP is a Linux* tool for software developers (both kernel and userspace), aimed at identifying where in the system latency is happening, and what kind of operation/action is causing the latency to happen so that the code can be changed to avoid the worst latency hiccups.
具体介绍看这篇文章就好了:latencytop深度了解你的Linux系统的延迟,项目地址:www.latencytop.org,已经打不开了。

logtop

Display real time statistics of whatever you want.
可以用来代替uniq -c|sort 的小工具,给它喂一段数据,自动统计排序,项目地址:julienpalard.github.io/logtop/

lttngtop

Lttngtop is an Ncurses interface for reading and browsing traces recorded by the LTTng tracer and displaying various statistics.
lttngtop 可以把LTTng 的分析结果以top 的方式展示,使用手册:lttngtop.1.

mtop

mtop (MySQL top) monitors a MySQL server showing the queries which are taking the most amount of time to complete.
一个用于MySQL 的工具,以top 的方式展示当前的查询语句与耗时,项目地址:mtop.sourceforge.net

mytop

a top clone for MySQL
也是一个用于MySQL 的工具,直观的展示当前数据库的状态,项目地址:http://jeremy.zawodny.com/mysql/mytop/

ntop

High-Speed Web-based Traffic Analysis and Flow Collection
ntop一个网络流量监控分析工具,提供了web 页面,非常美观,项目地址:ntop.org

numatop

NumaTOP is an observation tool for runtime memory locality characterization and analysis of processes and threads running on a NUMA system.
NUMA 的机器,内存是按照处理器进行分配的,有本地内存(LMA)与非本地内存(RMA)的区别,numatop 可以统计进程对RMA和LMA 的使用情况,项目地址:intel/numatop

pgtop

pgtop, display PostgreSQL processes in `top' style
类似mytop,pgtop 是一个用于PostgreSQL 的监控工具,项目地址/使用手册:search.cpan.org/dist/pgtop/pgtop

powertop

a tool that helps you find what software is using the most power
PowerTOP 是一个Intel提供的在用户空间、内核和硬件层面的节电工具。它可以监视进程,并显示哪些进程利用CPU并从空闲状态唤醒它,从而识别具有特殊高功率需求的应用程序。

ptop

用Python 写的类似top 的工具,项目地址:darxtrix.in/ptop/

qtop

qtop (pronounced queue-top) is a tool written in order to summarize the state of an LRMS (Local Resource Management System)

radeontop

View your GPU utilization, both for the total activity percent and individual blocks.
查看GPU 的使用情况,项目地址:clbr/radeontop

slabratetop

slabratetop shows the rate of allocations and total bytes from the kernel memory allocation caches (SLAB or SLUB), in a top-like display that refreshes.
slabratetop 统计展示SLAB 和SLUB 分配器分配内存的情况,项目地址:bcc/tools/slabratetop.py,使用手册:bcc/tools/slabratetop_example.txt

slabtop

display kernel slab cache information in real time
slaptop 是procps 里的一个工具,用来查看系统slab 的分布情况。

sntop

simple network top
一个简单的工具,可以配置一些地址,使用fping 探测地址的可用性,然后统计展示,项目地址:sntop.sourceforge.net

systemd-cgtop

Show top control groups by their resource usage
systemd-cgtop 是systemd 带的一个工具,展示systemd 下各个单元文件(slice,service,scopt 等)的资源使用情况,操作说明:systemd-cgtop

tcptop

display top TCP network packets by process
统计展示本地tcp 连接情况,项目地址:linux-bcc-tcptop

tiptop

Tiptop reads hardware performance counters and displays statistics about running processes, such as IPC, or cache misses. The statistics are shown in real time, in a way very similar to the "top" utility.
tiptop 读取CPU 硬件数据(IPC,cache missess等),可以看到每个进程的情况,项目地址:tiptop.gforge.inria.fr

top

display Linux tasks
top 就是top 啦,无需介绍,使用手册:man top

treetop

accurate memory and CPU usage stats for a linux process tree.
treetop ,可以很方便的统计出进程,以及它的子进程的资源占用情况,项目地址:turbo/treetop

virt-top

'top'-like utility for virtualization stats

wmtop

wmtop is a windowmaker dock app to display the top 3 processes running on a unix box displaying the cpu usage or memory usage in an attractive graphical way using little screen real estate. It's a kind of mini 'top'.
桌面环境的小工具,看起来相当古老,项目地址:wmtop.sourceforge.net

xrestop

Xrestop uses the X-Resource extension to provide 'top' like statistics of each connected X11 client's server side resource usage
统计桌面环境组件资源消耗的top工具,项目地址:xrestop

Glances

Glances an Eye on your system. A top/htop alternative.
类top 工具,强大、酷炫值得拥有,不过个人觉得对于运维来说好像不太实用,项目地址:nicolargo/glances

No comments:

Post a Comment