summaryrefslogtreecommitdiffstats
path: root/index.html
blob: 5ee8de61a592bf9294a1f5bcf24081246708e03c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <title>Glances by nicolargo</title>
  </head>

  <body>
    <div id="container">
      <div class="inner">

        <header>
          <h1>Glances</h1>
          <h2>Glances an Eye on your system</h2>
        </header>

        <section id="downloads" class="clearfix">
          <a href="https://github.com/nicolargo/glances/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
          <a href="https://github.com/nicolargo/glances/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
          <a href="https://github.com/nicolargo/glances" id="view-on-github" class="button"><span>View on GitHub</span></a>
        </section>

        <hr>

        <section id="main_content">
          <p><a href="https://flattr.com/thing/484466/nicolargoglances-on-GitHub"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this git repo"></a></p>

<h1></h1>

<h1>Glances -- Eye on your system</h1>

<h2>Description</h2>

<p>Glances is a CLI curses based monitoring tool for GNU/Linux and BSD OS.</p>

<p>Glances uses the PsUtil library to get information from your system.</p>

<p>It is developed in Python.</p>

<p>Console (80x24) screenshot:</p>

<p><img src="https://github.com/nicolargo/glances/raw/master/screenshot.png" alt="screenshot"></p>

<p>Wide terminal (&gt; 90x24) screenshot:</p>

<p><img src="https://github.com/nicolargo/glances/raw/master/screenshot-wide.png" alt="screenshot"></p>

<h2>Installation</h2>

<p>Pre-requisites (information for packagers):</p>

<ul>
<li>Python 2.6+ (not tested with Python 3+)</li>
<li>build-essential (for installation via Pypi and setup.py)</li>
<li>python-dev (for installation via Pypi)</li>
<li>python-setuptools (for the installation via setup.py)</li>
<li>python-psutil 0.4.1+ (replace the old libstatgrab's lib)</li>
<li>python-jinja2 2.0+ (optional for HTML export)</li>
</ul><h3>From package manager (very easy way)</h3>

<p>Packages exist for Debian (SID), Arch, Fedora, Redhat, FreeBSD...</p>

<h3>From PyPi (easy and cross platform way)</h3>

<p>PyPi is an official Python package manager.</p>

<p>You first need to install pypi on your system. For example on Debian/Ubuntu:</p>

<pre><code>$ sudo apt-get update
$ sudo apt-get install python-pip build-essential python-dev
</code></pre>

<p>Then install the latest Glances version:</p>

<pre><code>$ sudo pip install Glances
</code></pre>

<p>Note: if you are behind an HTTP Proxy, you should use</p>

<pre><code>$ sudo pip install --proxy=user:password@url:port Glances
</code></pre>

<h3>From PPA (easy way for Ubuntu/Mint...)</h3>

<p>Arnaud Hartmann (thanks to him !) maintains a PPA with the latest Glances version:</p>

<p>The PPA is available for Ubuntu version 9.10 to 12.04.</p>

<p>To install the PPA just enter:</p>

<pre><code>$ sudo add-apt-repository ppa:arnaud-hartmann/glances-stable
$ sudo apt-get update
</code></pre>

<p>Then install Glances:</p>

<pre><code>$ sudo apt-get install glances
</code></pre>

<h3>From <a href="http://mxcl.github.com/homebrew/">Homebrew</a> via PyPi (OS X)</h3>

<pre><code>$ brew install brew-pip
$ export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
$ brew pip Glances
</code></pre>

<p>If you have the following error:</p>

<pre><code>Error: Failed executing: pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X (.rb:)
This link will help resolve the above errors:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
</code></pre>

<p>Try to runs:</p>

<pre><code>$ pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X
$ brew link Glances
</code></pre>

<h3>Concerning Windows operating system</h3>

<p>Windows operating system only support the Glances in server mode. So if you ran Glances on Windows, it will be automaticaly running in server mode. </p>

<p>To install Glances on you system:</p>

<pre><code>* Install [Python for Windows](http://www.python.org/getit/)
* Install the [PsUtil lib](https://code.google.com/p/psutil/downloads/list)
* Download the latest [Glances version](https://raw.github.com/nicolargo/glances/master/glances/glances.py)
</code></pre>

<p>I need contributors to package Glances for Windows (for exemple using <a href="http://www.pyinstaller.org/">PyInstaller</a>).</p>

<h3>From source</h3>

<p>Get the latest version (form GitHub):</p>

<pre><code>$ rm -rf /tmp/nicolargo-glances-* 
$ wget -O /tmp/glances-last.tgz https://github.com/nicolargo/glances/tarball/master
</code></pre>

<p>Glances use a standard GNU style installer (for a Debian like system):</p>

<pre><code>$ sudo apt-get update
$ sudo apt-get install python-setuptools build-essential python-dev
$ cd /tmp
$ tar zxvf glances-last.tgz
$ cd nicolargo-glances-*
$ sudo python setup.py install
</code></pre>

<h2>Running</h2>

<h3>In standalone mode</h3>

<p>If you want to monitor your local machine, just run:</p>

<pre><code>$ glances
</code></pre>

<h3>In client/server mode</h3>

<p>If you want to remotely monitor a machine (called server) from another one (called client).</p>

<p>Run this command on the server:</p>

<pre><code>server$ glances -s
</code></pre>

<p>and this one on the client:</p>

<pre><code>client$ glances -c @server
</code></pre>

<p>where <a href="https://github.com/server" class="user-mention">@server</a> is the IP address or hostname of the server</p>

<p>Glances uses a <a href="http://docs.python.org/2/library/simplexmlrpcserver.html">XML/RPC</a> server and can be used by another client software.</p>

<h2>User guide</h2>

<p>By default, stats are refreshed every second, to change this setting, you can
use the -t option. For example to set the refresh rate to 5 seconds:</p>

<pre><code>$ glances -t 5
</code></pre>

<p>Importants stats are colored:</p>

<ul>
<li>GREEN:   stat counter is "OK"</li>
<li>BLUE:    stat counter is "CAREFUL"</li>
<li>MAGENTA: stat counter is "WARNING"</li>
<li>RED:     stat counter is "CRITICAL"</li>
</ul><p>When Glances is running, you can press:</p>

<ul>
<li>'h' to display a help message with the keys you can press</li>
<li>
<p>'a' to set the automatic mode. The processes are sorted automatically</p>

<p>If CPU &gt; 70%, sort by process "CPU consumption"</p>

<p>If MEM &gt; 70%, sort by process "memory size"</p>
</li>
<li><p>'b' switch between bit/s or byte/s for network IO</p></li>
<li><p>'c' sort the processes list by CPU consumption</p></li>
<li><p>'d' disable or enable the disk IO stats</p></li>
<li><p>'f' disable or enable the file system stats</p></li>
<li><p>'l' disable or enable the logs</p></li>
<li><p>'m' sort the processes list by process MEM</p></li>
<li><p>'n' disable or enable the network interfaces stats</p></li>
<li><p>'p' sort by process name</p></li>
<li><p>'w' delete finished warning logs messages</p></li>
<li><p>'x' delete finished warning and critical logs messages</p></li>
<li><p>'1' switch between global CPU and per core stats</p></li>
<li><p>'q' Exit</p></li>
</ul><p>In server mode, you can set the bind address (-B ADDRESS) and listenning TCP port (-p PORT).</p>

<p>In client mode, you can set the TCP port of the server (-p port).</p>

<p>Default binding address is 0.0.0.0 (Glancess will listen on all the networks interfaces).
        TCP port is 61209.</p>

<h3>Header</h3>

<p><img src="https://github.com/nicolargo/glances/raw/master/doc/header.png" alt="screenshot"></p>

<p>The header shows the host name and the operating system name, version and architecture.</p>

<h3>CPU</h3>

<p>Short view:</p>

<p><img src="https://github.com/nicolargo/glances/raw/master/doc/cpu.png" alt="screenshot"></p>

<p>Long view (only available if your terminal is wide enough)</p>

<p><img src="https://github.com/nicolargo/glances/raw/master/doc/cpu-wide.png" alt="screenshot"></p>

<p>The CPU stats are shown as a percentage and for the configured refresh
time. The total CPU usage is displayed on the first line.</p>

<p><img src="https://github.com/nicolargo/glances/raw/master/doc/percpu.png" alt="screenshot"></p>

<p>If horizontal space is available, per core CPU infomations are displayed. </p>

<p>Color code used:</p>

<p>If user|kernel|nice CPU is &lt; 50%, then status is set to "OK".</p>

<p>If user|kernel|nice CPU is &gt; 50%, then status is set to "CAREFUL".</p>

<p>If user|kernel|nice CPU is &gt; 70%, then status is set to "WARNING".</p>

<p>If user|kernel|nice CPU is &gt; 90%, then status is set to "CRITICAL".</p>

<h3>Load</h3>

<p><img src="https://github.com/nicolargo/glances/raw/master/doc/load.png" alt="screenshot"></p>

<p>On the Nosheep blog, Zach defines average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
number currently executing over 1, 5, and 15 minute time periods."</p>