documentation".
90 | html_title = 'HATop: Interactive ncurses client for HAProxy'
91 |
92 | # A shorter title for the navigation bar. Default is the same as html_title.
93 | html_short_title = 'HATop'
94 |
95 | # The name of an image file (relative to this directory) to place at the top
96 | # of the sidebar.
97 | #html_logo = None
98 |
99 | # The name of an image file (within the static path) to use as favicon of the
100 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
101 | # pixels large.
102 | #html_favicon = None
103 |
104 | # Add any paths that contain custom static files (such as style sheets) here,
105 | # relative to this directory. They are copied after the builtin static files,
106 | # so a file named "default.css" will overwrite the builtin "default.css".
107 | html_static_path = ['static']
108 |
109 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
110 | # using the given strftime format.
111 | html_last_updated_fmt = '%b %d, %Y'
112 |
113 | # If true, SmartyPants will be used to convert quotes and dashes to
114 | # typographically correct entities.
115 | html_use_smartypants = True
116 |
117 | # Custom sidebar templates, maps document names to template names.
118 | html_sidebars = {
119 | 'index': 'indexsidebar.html',
120 | }
121 |
122 | # Additional templates that should be rendered to pages, maps page names to
123 | # template names.
124 | html_additional_pages = {
125 | 'index': 'indexcontent.html',
126 | }
127 |
128 |
129 |
130 | # If false, no module index is generated.
131 | html_use_modindex = False
132 |
133 | # If false, no index is generated.
134 | html_use_index = False
135 |
136 | # If true, the index is split into individual pages for each letter.
137 | html_split_index = False
138 |
139 | # If true, links to the reST sources are added to the pages.
140 | html_show_sourcelink = True
141 |
142 | # If true, an OpenSearch description file will be output, and all pages will
143 | # contain a tag referring to it. The value of this option must be the
144 | # base URL from which the finished HTML is served.
145 | #html_use_opensearch = ''
146 |
147 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
148 | #html_file_suffix = ''
149 |
150 | # Output file base name for HTML help builder.
151 | htmlhelp_basename = 'hatopdoc'
152 |
153 |
154 | # -- Options for LaTeX output --------------------------------------------------
155 |
156 | # The paper size ('letter' or 'a4').
157 | latex_paper_size = 'a4'
158 |
159 | # The font size ('10pt', '11pt' or '12pt').
160 | #latex_font_size = '10pt'
161 |
162 | # Grouping the document tree into LaTeX files. List of tuples
163 | # (source start file, target name, title, author, documentclass [howto/manual]).
164 | latex_documents = [
165 | ('index', 'HATop.tex', u'HATop Documentation',
166 | u'John Feuerstein', 'manual'),
167 | ]
168 |
169 | # The name of an image file (relative to this directory) to place at the top of
170 | # the title page.
171 | #latex_logo = None
172 |
173 | # For "manual" documents, if this is true, then toplevel headings are parts,
174 | # not chapters.
175 | #latex_use_parts = False
176 |
177 | # Additional stuff for the LaTeX preamble.
178 | #latex_preamble = ''
179 |
180 | # Documents to append as an appendix to all manuals.
181 | #latex_appendices = []
182 |
183 | # If false, no module index is generated.
184 | #latex_use_modindex = True
185 |
--------------------------------------------------------------------------------
/doc/contents.rst:
--------------------------------------------------------------------------------
1 | %%%%%%%
2 | HATop
3 | %%%%%%%
4 |
5 | .. toctree::
6 |
7 | index.rst
8 | changes.rst
9 | readme.rst
10 | install.rst
11 | screenshots.rst
12 | keybinds.rst
13 | license.rst
14 | bugs.rst
15 |
16 |
--------------------------------------------------------------------------------
/doc/images/0-help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/0-help.png
--------------------------------------------------------------------------------
/doc/images/1-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/1-status.png
--------------------------------------------------------------------------------
/doc/images/2-traffic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/2-traffic.png
--------------------------------------------------------------------------------
/doc/images/3-http.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/3-http.png
--------------------------------------------------------------------------------
/doc/images/4-errors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/4-errors.png
--------------------------------------------------------------------------------
/doc/images/5-cli-help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/5-cli-help.png
--------------------------------------------------------------------------------
/doc/images/5-cli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/images/5-cli.png
--------------------------------------------------------------------------------
/doc/index.rst:
--------------------------------------------------------------------------------
1 | %%%%%%%
2 | Index
3 | %%%%%%%
4 |
--------------------------------------------------------------------------------
/doc/install.rst:
--------------------------------------------------------------------------------
1 | .. _install:
2 |
3 | .. include:: ../INSTALL
4 |
5 |
--------------------------------------------------------------------------------
/doc/keybinds.rst:
--------------------------------------------------------------------------------
1 | .. _keybinds:
2 |
3 | .. include:: ../KEYBINDS
4 |
5 |
--------------------------------------------------------------------------------
/doc/license.rst:
--------------------------------------------------------------------------------
1 | .. _license:
2 |
3 |
4 | *********************
5 | License and Copyright
6 | *********************
7 |
8 | HATop, all of it's modules and this documentation is:
9 |
10 | Copyright © 2009-2010 John Feuerstein. All rights reserved.
11 |
12 | -------
13 |
14 | .. literalinclude:: ../LICENSE
15 |
--------------------------------------------------------------------------------
/doc/readme.rst:
--------------------------------------------------------------------------------
1 | .. _readme:
2 |
3 | .. include:: ../README
4 |
5 |
--------------------------------------------------------------------------------
/doc/screenshots.rst:
--------------------------------------------------------------------------------
1 | .. _screenshots:
2 |
3 |
4 | ***********
5 | Screenshots
6 | ***********
7 |
8 | **Short screenshot tour showing all screen modes / viewports in action.**
9 |
10 | Global header reference (visible in all modes)::
11 |
12 | Node configured name of the haproxy node
13 | Uptime runtime since haproxy was initially started
14 | Pipes pipes are currently used for kernel-based tcp slicing
15 | Procs number of haproxy processes
16 | Tasks number of actice process tasks
17 | Queue number of queued process tasks (run queue)
18 | Proxies number of configured proxies
19 | Services number of configured services
20 |
21 |
22 | Online Help
23 | ===========
24 |
25 | Screenshot:
26 |
27 | .. image:: images/0-help.png
28 |
29 |
30 | 1: The default mode with health, session and queue statistics
31 | =============================================================
32 |
33 | Screenshot:
34 |
35 | .. image:: images/1-status.png
36 |
37 | Header reference::
38 |
39 | NAME name of the proxy and his services
40 | W configured weight of the service
41 | STATUS service status (UP/DOWN/NOLB/MAINT/MAINT(via)...)
42 | CHECK status of last health check (see status reference below)
43 |
44 | ACT server is active (server), number of active servers (backend)
45 | BCK server is backup (server), number of backup servers (backend)
46 | QCUR current queued requests
47 | QMAX max queued requests
48 | SCUR current sessions
49 | SMAX max sessions
50 | SLIM sessions limit
51 | STOT total sessions
52 |
53 |
54 | 2: Connection and request rates as well as traffic stats
55 | ========================================================
56 |
57 | Screenshot:
58 |
59 | .. image:: images/2-traffic.png
60 |
61 | Header reference::
62 |
63 | NAME name of the proxy and his services
64 | W configured weight of the service
65 | STATUS service status (UP/DOWN/NOLB/MAINT/MAINT(via)...)
66 |
67 | LBTOT total number of times a server was selected
68 | RATE number of sessions per second over last elapsed second
69 | RLIM limit on new sessions per second
70 | RMAX max number of new sessions per second
71 | BIN bytes in (IEEE 1541-2002)
72 | BOUT bytes out (IEEE 1541-2002)
73 |
74 |
75 | 3: Various statistical information related to HTTP
76 | ==================================================
77 |
78 | Screenshot:
79 |
80 | .. image:: images/3-http.png
81 |
82 | Header reference::
83 |
84 | NAME name of the proxy and his services
85 | W configured weight of the service
86 | STATUS service status (UP/DOWN/NOLB/MAINT/MAINT(via)...)
87 |
88 | RATE HTTP requests per second over last elapsed second
89 | RMAX max number of HTTP requests per second observed
90 | RTOT total number of HTTP requests received
91 | 1xx number of HTTP responses with 1xx code
92 | 2xx number of HTTP responses with 2xx code
93 | 3xx number of HTTP responses with 3xx code
94 | 4xx number of HTTP responses with 4xx code
95 | 5xx number of HTTP responses with 5xx code
96 | ?xx number of HTTP responses with other codes (protocol error)
97 |
98 |
99 | 4: Health info, various error counters and downtimes
100 | ====================================================
101 |
102 | Screenshot:
103 |
104 | .. image:: images/4-errors.png
105 |
106 | Header reference::
107 |
108 | NAME name of the proxy and his services
109 | W configured weight of the service
110 | STATUS service status (UP/DOWN/NOLB/MAINT/MAINT(via)...)
111 | CHECK status of last health check (see status reference below)
112 |
113 | CF number of failed checks
114 | CD number of UP->DOWN transitions
115 | CL last status change
116 | ECONN connection errors
117 | EREQ request errors
118 | ERSP response errors
119 | DREQ denied requests
120 | DRSP denied responses
121 | DOWN total downtime
122 |
123 |
124 | 5: The embedded command line client
125 | ===================================
126 |
127 | Screenshots:
128 |
129 | .. image:: images/5-cli.png
130 |
131 | .. raw:: html
132 |
133 |
134 |
135 |
136 | .. image:: images/5-cli-help.png
137 |
138 |
139 |
--------------------------------------------------------------------------------
/doc/static/default.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Sphinx stylesheet -- default theme
3 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 | */
5 |
6 | @import url("basic.css");
7 |
8 | /* -- page layout ----------------------------------------------------------- */
9 |
10 | body {
11 | font-family: sans-serif;
12 | font-size: 100%;
13 | background-color: #11303d;
14 | color: #000;
15 | margin: 0;
16 | padding: 0;
17 | }
18 |
19 | div.document {
20 | background-color: #1c4e63;
21 | }
22 |
23 | div.documentwrapper {
24 | float: left;
25 | width: 100%;
26 | }
27 |
28 | div.bodywrapper {
29 | margin: 0 0 0 230px;
30 | }
31 |
32 | div.body {
33 | background-color: #ffffff;
34 | color: #000000;
35 | padding: 0 20px 30px 20px;
36 | }
37 |
38 | div.footer {
39 | color: #ffffff;
40 | width: 100%;
41 | padding: 9px 0 9px 0;
42 | text-align: center;
43 | font-size: 75%;
44 | }
45 |
46 | div.footer a {
47 | color: #ffffff;
48 | text-decoration: underline;
49 | }
50 |
51 | div.related {
52 | background-color: #133f52;
53 | line-height: 30px;
54 | color: #ffffff;
55 | }
56 |
57 | div.related a {
58 | color: #ffffff;
59 | }
60 |
61 | div.sphinxsidebar {
62 | }
63 |
64 | div.sphinxsidebar h3 {
65 | font-family: 'Trebuchet MS', sans-serif;
66 | color: #ffffff;
67 | font-size: 1.4em;
68 | font-weight: normal;
69 | margin: 0;
70 | padding: 0;
71 | }
72 |
73 | div.sphinxsidebar h3 a {
74 | color: #ffffff;
75 | }
76 |
77 | div.sphinxsidebar h4 {
78 | font-family: 'Trebuchet MS', sans-serif;
79 | color: #ffffff;
80 | font-size: 1.3em;
81 | font-weight: normal;
82 | margin: 5px 0 0 0;
83 | padding: 0;
84 | }
85 |
86 | div.sphinxsidebar p {
87 | color: #ffffff;
88 | }
89 |
90 | div.sphinxsidebar p.topless {
91 | margin: 5px 10px 10px 10px;
92 | }
93 |
94 | div.sphinxsidebar ul {
95 | margin: 10px;
96 | padding: 0;
97 | color: #ffffff;
98 | }
99 |
100 | div.sphinxsidebar a {
101 | color: #98dbcc;
102 | }
103 |
104 | div.sphinxsidebar input {
105 | border: 1px solid #11303D;
106 | font-family: sans-serif;
107 | font-size: 1em;
108 | }
109 |
110 | div.sphinxsidebar input.donate {
111 | margin-top: 10px;
112 | margin-bottom: 30px;
113 | margin-left: 30px;
114 | border: 0px;
115 | }
116 |
117 | /* -- body styles ----------------------------------------------------------- */
118 |
119 | a {
120 | color: #355f7c;
121 | text-decoration: none;
122 | }
123 |
124 | a:hover {
125 | text-decoration: underline;
126 | }
127 |
128 | div.body p, div.body dd, div.body li {
129 | text-align: justify;
130 | line-height: 130%;
131 | }
132 |
133 | div.body h1,
134 | div.body h2,
135 | div.body h3,
136 | div.body h4,
137 | div.body h5,
138 | div.body h6 {
139 | font-family: 'Trebuchet MS', sans-serif;
140 | background-color: #f2f2f2;
141 | font-weight: normal;
142 | color: #20435c;
143 | border-bottom: 1px solid #ccc;
144 | margin: 20px -20px 10px -20px;
145 | padding: 3px 0 3px 10px;
146 | }
147 |
148 | div.body h1 { margin-top: 0; font-size: 200%; }
149 | div.body h2 { font-size: 160%; }
150 | div.body h3 { font-size: 140%; }
151 | div.body h4 { font-size: 120%; }
152 | div.body h5 { font-size: 110%; }
153 | div.body h6 { font-size: 100%; }
154 |
155 | a.headerlink {
156 | color: #c60f0f;
157 | font-size: 0.8em;
158 | padding: 0 4px 0 4px;
159 | text-decoration: none;
160 | }
161 |
162 | a.headerlink:hover {
163 | background-color: #c60f0f;
164 | color: white;
165 | }
166 |
167 | div.body p, div.body dd, div.body li {
168 | text-align: justify;
169 | line-height: 130%;
170 | }
171 |
172 | div.body p.primer {
173 | line-height: 130%;
174 | font-size: 120%;
175 | }
176 |
177 | div.body p.description {
178 | text-align: justify;
179 | line-height: 130%;
180 | max-width: 800px;
181 | }
182 |
183 | div.body hr {
184 | border: 0px;
185 | height: 10px;
186 | }
187 |
188 | div.body li.features {
189 | margin-left: 100px;
190 | text-align: justify;
191 | line-height: 130%;
192 | }
193 |
194 |
195 | div.admonition p.admonition-title + p {
196 | display: inline;
197 | }
198 |
199 | div.note {
200 | background-color: #eee;
201 | border: 1px solid #ccc;
202 | }
203 |
204 | div.seealso {
205 | background-color: #ffc;
206 | border: 1px solid #ff6;
207 | }
208 |
209 | div.topic {
210 | background-color: #eee;
211 | }
212 |
213 | div.warning {
214 | background-color: #ffe4e4;
215 | border: 1px solid #f66;
216 | }
217 |
218 | p.admonition-title {
219 | display: inline;
220 | }
221 |
222 | p.admonition-title:after {
223 | content: ":";
224 | }
225 |
226 | pre {
227 | padding: 5px;
228 | background-color: #eeffcc;
229 | color: #333333;
230 | line-height: 120%;
231 | border: 1px solid #ac9;
232 | border-left: none;
233 | border-right: none;
234 | }
235 |
236 | tt {
237 | background-color: #ecf0f3;
238 | padding: 0 1px 0 1px;
239 | font-size: 0.95em;
240 | }
241 |
242 | /* -- custom ----------------------------------------------------------- */
243 |
244 | a.download {
245 | display: table;
246 | background: #F0F0F0;
247 | padding: 5px;
248 | margin-top: 10px;
249 | text-decoration: none;
250 | }
251 | a.download:link {
252 | color: #355f7c;
253 | text-decoration: none;
254 | }
255 | a.download:visited {
256 | color: #355f7c;
257 | text-decoration: none;
258 | }
259 | a.download:hover {
260 | color: #000000;
261 | text-decoration: none;
262 | }
263 |
264 | table.docutils {
265 | border:0 solid #DDCCEE;
266 | border-collapse:collapse;
267 | }
268 | table.docutils td, table.docutils th {
269 | background-color:#EEEEFF;
270 | border-left:0 none;
271 | padding:2px 5px;
272 | }
273 | table.field-list td, table.field-list th {
274 | border:0 none !important;
275 | }
276 | table.footnote td, table.footnote th {
277 | border:0 none !important;
278 | }
279 | table.docutils th {
280 | background-color:#EEDDEE;
281 | border-top:1px solid #CCAACC;
282 | }
283 |
284 |
--------------------------------------------------------------------------------
/doc/static/disk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/static/disk.png
--------------------------------------------------------------------------------
/doc/static/glider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/static/glider.png
--------------------------------------------------------------------------------
/doc/static/gplv3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/static/gplv3.png
--------------------------------------------------------------------------------
/doc/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wirehive/hatop/557ba48f3a743f23a20cf379c8cb773148fcb0d3/doc/static/logo.png
--------------------------------------------------------------------------------
/doc/templates/indexcontent.html:
--------------------------------------------------------------------------------
1 | {% extends "defindex.html" %}
2 | {% block body %}
3 | {{ docstitle|e }}
4 |
5 |
6 |
7 |
8 | Welcome! This is
9 | {% block description %}the documentation for {{ project|e }}
10 | version {{ release|e }}{% if last_updated %}, last updated {{ last_updated|e }}{% endif %}{% endblock %}.
11 |
12 |
13 | What is HATop?
14 |
15 |
16 | HATop is an interactive ncurses client and real-time monitoring,
17 | statistics displaying tool for the
18 | HAProxy
19 | TCP/HTTP load balancer.
20 |
21 |
22 |
23 |
24 | HATop's appearance is similar to
25 | top (1).
26 | It supports various modes for detailed statistics of all configured proxies
27 | and services in near realtime. In addition, it features an interactive CLI for
28 | the haproxy unix socket. This allows administrators to control the given
29 | haproxy instance (change server weight, put servers into maintenance mode, ...)
30 | directly out of hatop (using keybinds or the CLI) and monitor the results
31 | immediately.
32 |
33 |
34 |
35 | HATop is written in pure Python
36 | and has no external dependencies.
37 | It requires Python 2.4 or later and HAProxy 1.4 or later.
38 |
39 |
40 |
41 |
42 |
43 |
44 | Download HATop v{{ version }} [hatop-{{ version }}.tar.gz]
45 |
46 |
47 |
48 |
49 |
50 |
51 | {% block tables %}
52 | Documentation:
53 |
54 |
55 |
56 | What's new in HATop v{{ version }}?
57 | or see the complete changelog
58 | Complete Table of Contents
59 | lists all sections and subsections
60 |
61 |
62 | Screenshots
63 | some screenshots
64 | Keybinds
65 | keybind quickref
66 |
67 |
68 |
69 |
70 | Meta information:
71 |
72 |
73 |
74 | License and Copyright
75 | how you may use the code
76 |
77 | Reporting bugs
78 | please inform us of any problems
79 |
80 |
81 |
82 | {% endblock %}
83 |
84 | Quickstart
85 |
86 |
87 | First of all, make sure you have the stats socket enabled in the haproxy config:
88 |
89 |
90 |
global
91 | stats socket /var/run/haproxy/haproxy.sock mode 0600 level admin
92 |
93 |
94 |
95 |
96 | That's all you need to use HATop:
97 |
98 |
99 |
100 | $ hatop -s /var/run/haproxy/haproxy.sock
101 |
102 |
103 |
104 |
105 | See also:
106 | HATop Installation
107 |
108 |
109 | Development
110 |
111 |
112 | Getting the HATop source code using Git:
113 |
114 |
115 |
116 | $ git clone git://labs.feurix.org/feurix/admin/hatop.git
117 |
118 |
119 |
120 |
121 | See also:
122 | Git Webinterface ,
123 | Source Browser
124 |
125 |
126 | {% endblock %}
127 |
--------------------------------------------------------------------------------
/doc/templates/indexsidebar.html:
--------------------------------------------------------------------------------
1 | Documentation
2 |
9 |
10 | Examples
11 |
14 |
15 | Resources
16 |
21 |
22 | Downloads
23 |
28 |
29 | Contact us
30 |
31 |
32 | Support us
33 |
41 |
--------------------------------------------------------------------------------
/doc/templates/layout.html:
--------------------------------------------------------------------------------
1 | {% extends "!layout.html" %}
2 | {% block rootrellink %}
3 |
5 | Feurix Free Open Source Projects {{ reldelim1 }}
6 | {{ shorttitle }} {{ reldelim1 }}
7 | {% endblock %}
8 | {% block extrahead %}
9 |
10 | {{ super() }}
11 | {% endblock %}
12 | {% block sidebarlogo %}
13 |
14 |
15 |
16 | {% endblock %}
17 | {% block footer %}
18 |
23 | {% endblock %}
24 |
--------------------------------------------------------------------------------
/man/hatop.1:
--------------------------------------------------------------------------------
1 | .TH HATOP 1 "19 August 2010"
2 | .SH NAME
3 | HATop \- interactive ncurses client for haproxy
4 | .SH SYNOPSIS
5 | hatop \-s \fISOCKET\fB [\fIOPTIONS\fB]
6 | .SH DESCRIPTION
7 | HATop is an interactive ncurses client and real\-time monitoring,
8 | statistics displaying tool for the HAProxy TCP/HTTP load balancer.
9 |
10 | HATop's appearance is similar to top(1). It supports various modes for
11 | detailed statistics of all configured proxies and services in near realtime.
12 | In addition, it features an interactive CLI for the haproxy unix socket.
13 | This allows administrators to control the given haproxy instance
14 | (change server weight, put servers into maintenance mode, ...) directly out
15 | of hatop (using keybinds or the CLI) and monitor the results immediately.
16 |
17 | HATop uses a unix domain socket to communicate with HAProxy. This can be
18 | configured in the HAProxy configuration using the "stats socket" option.
19 | To enable all of HATop's features the "level" parameter of this option
20 | should be set to "admin".
21 | .SH OPTIONS
22 | .TP
23 | \fB\-\-version\fP
24 | show version number and exit
25 | .TP
26 | \fB\-h, \-\-help\fP
27 | show help message and exit
28 | .TP
29 | \fB\-s \fISOCKET\fB, \-\-unix\-socket=\fISOCKET\fP
30 | path to the haproxy stats socket
31 | .TP
32 | \fB\-i \fIINTERVAL\fB, \-\-update\-interval=\fIINTERVAL\fP
33 | update interval in seconds (1\-30, default: 3)
34 | .TP
35 | \fB\-m \fIMODE\fB, \-\-mode=\fIMODE\fP
36 | start in specific mode (1\-5, default: 1)
37 | .TP
38 | \fB\-n, \-\-read\-only\fP
39 | disable the cli and query for stats only
40 |
41 | .PP
42 | The following filter options may be given multiple times:
43 | .TP
44 | \fB\-f \fIFILTER\fB, \-\-filter=\fIFILTER\fP
45 | stat filter in format " "
46 | .TP
47 | \fB\-p \fIPROXY\fB, \-\-proxy=\fIPROXY\fP
48 | proxy filter in format ""
49 | .SH KEYBINDS
50 | .TP
51 | \fBHh?\fP
52 | Display help screen
53 | .TP
54 | \fBQq\fP
55 | Quit
56 | .TP
57 | \fBTAB\fP
58 | Cycle mode forwards
59 | .TP
60 | \fBS\-TAB\fP
61 | Cycle mode backwards
62 | .TP
63 | \fBESC\-n\fP
64 | Switch to mode n, where n is the numeric mode id
65 | .TP
66 | \fBESC\fP
67 | Jump to previous mode
68 | .TP
69 | \fBENTER\fP
70 | Display hotkey menu for selected service
71 | .TP
72 | \fBSPACE\fP
73 | Copy and paste selected service identifier to the CLI
74 | .TP
75 | \fBUP\fP / \fBDOWN\fP / \fBPGUP\fP / \fBPGDOWN\fP / \fBHOME\fP / \fBEND\fP
76 | Scroll the stat views to select a given service
77 | .SH HOTKEYS
78 | .TP
79 | \fBF4\fP
80 | Restore initial server weight
81 |
82 | .TP
83 | \fBF5\fP
84 | Decrease server weight: \- 10
85 | .TP
86 | \fBF6\fP
87 | Decrease server weight: \- 1
88 | .TP
89 | \fBF7\fP
90 | Increase server weight: + 1
91 | .TP
92 | \fBF8\fP
93 | Increase server weight: + 10
94 |
95 | .TP
96 | \fBF9\fP
97 | Enable server (return from maintenance mode)
98 | .TP
99 | \fBF10\fP
100 | Disable server (put into maintenance mode)
101 | .SH SEE ALSO
102 | .BR haproxy (1)
103 |
104 | A much better documentation can be found online:
105 | .PP
106 | http://feurix.org/projects/hatop/
107 | .SH AUTHOR
108 | HATop and this man page was written by John Feuerstein.
109 |
--------------------------------------------------------------------------------
/test/.gitignore:
--------------------------------------------------------------------------------
1 | *.sock
2 | *.txt
3 |
--------------------------------------------------------------------------------
/test/sample-socket.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # Thu Apr 08 16:51:58 CEST 2010 John Feuerstein
3 | #
4 | # This script emulates the haproxy stats unix socket to help in
5 | # hatop development and to provide some (fake) sample data.
6 |
7 | SOCKET_PATH='sample-socket.sock'
8 | SOCKET_PROMPT='> '
9 |
10 | import os
11 | import socket
12 | import sys
13 | import time
14 |
15 | if not len(sys.argv) == 3:
16 | sys.stderr.write(
17 | 'usage: %s '
18 | ' '
19 | '\n' % sys.argv[0])
20 | sys.exit(1)
21 |
22 | def read_info():
23 | with file(sys.argv[1]) as info:
24 | data = info.read()
25 | return data
26 |
27 | def read_stat():
28 | with file(sys.argv[2]) as stat:
29 | data = stat.read()
30 | return data
31 |
32 | try:
33 | os.unlink(SOCKET_PATH)
34 | except:
35 | pass
36 |
37 | s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
38 | s.bind(SOCKET_PATH)
39 | s.listen(1)
40 |
41 | while 1:
42 | conn, addr = s.accept()
43 |
44 | while 1:
45 | data = conn.recv(1024).strip()
46 | print('--- %s' % time.ctime())
47 | print('<<< %s' % data)
48 | if not data:
49 | continue
50 | if data == 'quit':
51 | break
52 | elif data.startswith('show info'):
53 | print('>>> info...')
54 | conn.sendall(read_info())
55 | elif data.startswith('show stat'):
56 | print('>>> stat...')
57 | conn.sendall(read_stat())
58 | print('>>> empty line (end of response)')
59 | conn.sendall('\n')
60 | print('>>> prompt')
61 | conn.sendall(SOCKET_PROMPT)
62 | print('--- %s\n' % time.ctime())
63 |
64 | conn.close()
65 |
66 |
--------------------------------------------------------------------------------