linux系统实时响应rtox,linux精讲之“HaTop使用”

1.什么是HaTop

HATop 是一个交互式的基于 ncurses 开发的实时监控HAProxy负载均衡系统的统计工具。后来有人对该工具进行改进,增加了 TCP 支持

2.安装部署

在安装之前需要开启haproxy的sock

修改

/etc/haproxy/haproxy.cfg文件中的global部分,添加

stats socket /tmp/haproxy.sock

下载安装包

cd /usr/local/src/

wget https://github.com/Wirehive/hatop/archive/master.zip

安装

unzip master.zip

cd hatop-master/

install -m 755  bin/hatop /usr/local/bin

install -m 644 man/hatop.1 /usr/local/share/man/man1

gzip /usr/local/share/man/man1/hatop.1

以上可以直接复制黏贴就可以实现了,具体的参数在hatop-master/README  可以了解到

3.HaTop使用

hatop -s /tmp/haproxy.sock

e686118a6dd99fc75e70d8417d7b837f.png

按q键退出,运行界面分为5大块      (界面切换分别按 1 2 3 4 5 来选择)

很多参数在上面的hatop-master/README  文件中可以了解的,界面也很清晰的告诉我们多少个机器是OK的

In STATUS mode

--------------

::

ACT         server is active (server), number of active servers (backend)  存货机器

BCK         server is backup (server), number of backup servers (backend)  备份机器

QCUR        current queued requests  当前队列请求

QMAX        max queued requests   最大队列请求

SCUR        current sessions  当前会话

SMAX        max sessions 最大会话

SLIM        sessions limit   会话限制

STOT        total sessions  总会话数

In TRAFFIC mode

---------------

::

LBTOT       total number of times a server was selected  每个服务器被选中的次数

RATE        number of sessions per second over last elapsed second  过去一秒的会话运行次数

RLIM        limit on new sessions per second  在每秒新建会话限制

RMAX        max number of new sessions per second 每秒最大连接数

BIN         bytes in (IEEE 1541-2002)

BOUT        bytes out (IEEE 1541-2002)

In HTTP mode

------------

::

RATE        HTTP requests per second over last elapsed second  过去1妙http请求

RMAX        max number of HTTP requests per second observed

RTOT        total number of HTTP requests received

1xx         number of HTTP responses with 1xx code

2xx         number of HTTP responses with 2xx code

3xx         number of HTTP responses with 3xx code

4xx         number of HTTP responses with 4xx code

5xx         number of HTTP responses with 5xx code

?xx         number of HTTP responses with other codes (protocol error)

In ERRORS mode

--------------

::

CF          number of failed checks

CD          number of UP->DOWN transitions

CL          last status change

ECONN       connection errors

EREQ        request errors

ERSP        response errors

DREQ        denied requests

DRSP        denied responses

DOWN        total downtime

Health check status reference

=============================

::

UNK         unknown

INI         initializing

SOCKERR     socket error

L4OK        check passed on layer 4, no upper layers testing enabled

L4TMOUT     layer 1-4 timeout

L4CON       layer 1-4 connection problem, for example

"Connection refused" (tcp rst) or "No route to host" (icmp)

L6OK        check passed on layer 6

L6TOUT      layer 6 (SSL) timeout

L6RSP       layer 6 invalid response - protocol error

L7OK        check passed on layer 7

L7OKC       check conditionally passed on layer 7, for example 404 with

disable-on-404

L7TOUT      layer 7 (HTTP/SMTP) timeout

L7RSP       layer 7 invalid response - protocol error

L7STS       layer 7 response error, for example HTTP 5xx

d1897bb346d4feb99bc8a44e8d99f578.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值