From 73418eadd8d7ea0bcb29adcc997d96ad75a5ca02 Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Sat, 18 Jan 2014 11:02:36 +0100 Subject: version 1.7.4 --- docs/_build/doctrees/environment.pickle | Bin 14996 -> 16564 bytes docs/_build/doctrees/glances-doc.doctree | Bin 123168 -> 128835 bytes docs/_build/html/_images/screenshot-wide.png | Bin 208585 -> 95179 bytes docs/_build/html/_sources/glances-doc.txt | 45 ++++++++++++++++++++++++--- docs/_build/html/glances-doc.html | 44 +++++++++++++++++++++----- docs/_build/html/index.html | 1 + docs/_build/html/searchindex.js | 2 +- docs/glances-doc.html | 43 ++++++++++++++++++++----- glances/glances.py | 26 ++++++++-------- 9 files changed, 128 insertions(+), 33 deletions(-) diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 55ef87fd..4cde094f 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/glances-doc.doctree b/docs/_build/doctrees/glances-doc.doctree index 812de66b..9991876d 100644 Binary files a/docs/_build/doctrees/glances-doc.doctree and b/docs/_build/doctrees/glances-doc.doctree differ diff --git a/docs/_build/html/_images/screenshot-wide.png b/docs/_build/html/_images/screenshot-wide.png index e0e3a510..41e6ae09 100644 Binary files a/docs/_build/html/_images/screenshot-wide.png and b/docs/_build/html/_images/screenshot-wide.png differ diff --git a/docs/_build/html/_sources/glances-doc.txt b/docs/_build/html/_sources/glances-doc.txt index b3549798..2bf47d98 100644 --- a/docs/_build/html/_sources/glances-doc.txt +++ b/docs/_build/html/_sources/glances-doc.txt @@ -2,11 +2,11 @@ Glances ======= -This manual describes *Glances* version 1.7.3. +This manual describes *Glances* version 1.7.4. -Copyright © 2012-2013 Nicolas Hennion +Copyright © 2012-2014 Nicolas Hennion -November 2013 +January 2014 .. contents:: Table of Contents @@ -154,7 +154,7 @@ Configuration No configuration file is mandatory to use Glances. -Furthermore a configuration file is needed for setup limits and/or monitored processes list. +Furthermore a configuration file is needed for setup limits, disks or network interfaces to hide and/or monitored processes list. By default, the configuration file is under: @@ -202,7 +202,7 @@ Header .. image:: images/header.png -The header shows the OS name, release version, platform architecture and the hostname. +The header shows the hostname, OS name, release version, platform architecture and system uptime. On Linux, it shows also the kernel version. CPU @@ -292,6 +292,8 @@ if the bit rate is higher than 70 Mbps. | If bit rate is ``>70%``, then status is set to ``"WARNING"`` | If bit rate is ``>90%``, then status is set to ``"CRITICAL"`` +*Note*: In the configuration file, you can define a list of network interfaces to hide. + Sensors ------- @@ -331,6 +333,8 @@ Glances displays the disk I/O throughput. The unit is adapted dynamically. *Note*: There is no alert on this information. +*Note*: In the configuration file, you can define a list of disk to hide. + File system ----------- @@ -365,6 +369,14 @@ Three views are available for processes: * Optional monitored processes list (new in 1.7) * Processes list +The processes summary line display: + +* Tasks number (total number of processes) +* Threads number +* Running tasks number +* Sleeping tasks number +* Other tasks number (not running or sleeping) + By default, or if you hit the ``a`` key, the processes list is automatically sorted by CPU of memory usage. @@ -506,6 +518,7 @@ else: On the left, you can easily see if you are connected to a Glances server. + API documentation ================= @@ -513,6 +526,28 @@ Glances uses a `XML-RPC server`_ and can be used by another client software. API documentation is available at https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To +Others outputs +============== + +Thanks to the -o option, it is possible to export statistics to CSV or HTML files. + +.. code-block:: console + + $ glances -o CSV -f /tmp/glances.csv + +CSV files have on line per stats: + +- load,load1,load5,load15 +- mem,total,used,free +- swap,total,used,free +- cpu,user,system,nice,idel,iowait,irq + +.. code-block:: console + + $ glances -o HTML -f /tmp + +Note: The css and img folders (glances/data) should be in the /tmp folder + Support ======= diff --git a/docs/_build/html/glances-doc.html b/docs/_build/html/glances-doc.html index f6686717..369aca75 100644 --- a/docs/_build/html/glances-doc.html +++ b/docs/_build/html/glances-doc.html @@ -49,9 +49,9 @@

Glances

-

This manual describes Glances version 1.7.3.

-

Copyright © 2012-2013 Nicolas Hennion <nicolas@nicolargo.com>

-

November 2013

+

This manual describes Glances version 1.7.4.

+

Copyright © 2012-2014 Nicolas Hennion <nicolas@nicolargo.com>

+

January 2014

Table of Contents

    @@ -85,7 +85,8 @@
  • API documentation
  • -
  • Support
  • +
  • Others outputs
  • +
  • Support
  • @@ -260,7 +261,7 @@ just run on the server:

    Configuration

    No configuration file is mandatory to use Glances.

    -

    Furthermore a configuration file is needed for setup limits and/or monitored processes list.

    +

    Furthermore a configuration file is needed for setup limits, disks or network interfaces to hide and/or monitored processes list.

    By default, the configuration file is under:

    @@ -305,7 +306,7 @@ directories on your system, except for Windows.

    @@ -375,6 +376,7 @@ if the bit rate is higher than 70 Mbps.

    If bit rate is >70%, then status is set to "WARNING"
    If bit rate is >90%, then status is set to "CRITICAL"
    +

    Note: In the configuration file, you can define a list of network interfaces to hide.

    Sensors

    @@ -399,6 +401,7 @@ if the bit rate is higher than 70 Mbps.

    _images/diskio.png

    Glances displays the disk I/O throughput. The unit is adapted dynamically.

    Note: There is no alert on this information.

    +

    Note: In the configuration file, you can define a list of disk to hide.

    File system

    @@ -426,6 +429,14 @@ adapted dynamically.

  • Optional monitored processes list (new in 1.7)
  • Processes list
  • +

    The processes summary line display:

    +
      +
    • Tasks number (total number of processes)
    • +
    • Threads number
    • +
    • Running tasks number
    • +
    • Sleeping tasks number
    • +
    • Other tasks number (not running or sleeping)
    • +

    By default, or if you hit the a key, the processes list is automatically sorted by CPU of memory usage.

    Note: limit values can be overwritten in the configuration file under the [process] section.

    @@ -552,8 +563,26 @@ is installed on your system then Glances displays the available percent capacity

    Glances uses a XML-RPC server and can be used by another client software.

    API documentation is available at https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To

    +
    +

    Others outputs

    +

    Thanks to the -o option, it is possible to export statistics to CSV or HTML files.

    +
    $ glances -o CSV -f /tmp/glances.csv
    +
    +
    +

    CSV files have on line per stats:

    +
      +
    • load,load1,load5,load15
    • +
    • mem,total,used,free
    • +
    • swap,total,used,free
    • +
    • cpu,user,system,nice,idel,iowait,irq
    • +
    +
    $ glances -o HTML -f /tmp
    +
    +
    +

    Note: The css and img folders (glances/data) should be in the /tmp folder

    +
    -

    Support

    +

    Support

    To report a bug or a feature request use the bug tracking system at https://github.com/nicolargo/glances/issues

    Feel free to contribute!

    @@ -615,6 +644,7 @@ is installed on your system then Glances displays the available percent capacity
  • API documentation
  • +
  • Others outputs
  • Support
  • diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index 3c01848d..716c0fca 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -67,6 +67,7 @@
  • Configuration
  • Anatomy of the application
  • API documentation
  • +
  • Others outputs
  • Support
  • diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index 10a73d18..006299ef 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{represent:0,all:0,code:1,appdata:0,global:0,sleep:0,follow:0,disk:0,compact:0,middl:0,depend:0,program:0,swap:0,under:0,list_1_command:0,sourc:1,string:0,iowait:0,trough:0,pocess:[],level:0,list:0,item:0,rate:0,port:0,compat:0,index:1,hide:0,sum:0,access:0,delet:0,version:0,"new":0,net:0,method:0,full:0,mem:0,batinfo:0,here:0,address:0,path:0,legend:0,valu:0,wait:0,search:1,queue:0,throughput:0,list_1_countmax:0,modul:[0,1],unix:0,api:[0,1],xdg_config_hom:0,instal:0,total:0,unit:0,regex:0,from:[0,1],describ:0,memori:0,two:0,call:0,usr:0,sort:0,warn:0,flag:0,setup:0,work:0,can:0,root:0,overrid:0,prompt:0,process:0,indic:1,critic:0,minimum:0,caution:0,want:0,magenta:0,occur:0,end:0,fpm:0,anoth:0,write:0,how:0,low:0,csv:0,max:0,mai:0,data:0,averag:0,"short":0,footer:0,bind:0,counter:0,issu:0,inform:[0,1],"switch":0,curent:[],combin:0,allow:0,ethernet:0,order:0,hennion:0,cyberc:0,help:0,over:0,privileg:0,dynam:0,group:0,monitor:[0,1],fit:0,platform:[0,1],window:0,good:0,"return":0,python:[0,1],interrupt:0,introduct:[0,1],name:0,refresh:0,psutil:[0,1],mode:0,each:0,found:0,side:0,hard:0,connect:0,tirrel:0,shown:0,network:0,space:0,content:[0,1],adapt:0,sensor:0,red:0,free:0,standalon:0,base:[0,1],zombi:0,releas:0,"byte":0,care:0,mbit:0,filter:0,view:0,first:0,softwar:0,feel:0,number:0,system:[0,1],date:0,messag:0,size:0,sheep:0,given:0,script:0,interact:0,mkdir:0,capac:0,least:0,stori:0,cumul:0,termin:0,listen:0,shell:0,consol:0,option:0,tool:[0,1],copi:0,github:[0,1],hddtemp:0,list_1_regex:0,than:0,rss:0,remot:0,second:0,horizont:0,were:0,consumpt:0,minut:0,zachari:0,countmin:0,ran:0,ram:0,have:0,tabl:[0,1],need:0,min:0,note:0,also:0,ideal:0,client:0,which:0,green:0,singl:0,anatomi:[0,1],blue:0,trace:0,track:0,regular:0,"80x24":0,bsd:0,request:0,drive:0,section:0,show:0,xml:0,current:0,onli:0,locat:0,execut:0,copyright:0,configur:[0,1],written:[0,1],should:0,folder:0,local:0,overwritten:0,hit:0,contribut:0,get:[0,1],express:0,stop:0,report:0,requir:0,enabl:0,through:0,grab:0,septemb:[],where:0,summari:0,wiki:0,kernel:0,set:0,maximum:0,see:0,sec:0,statu:0,kei:0,list_1_descript:0,enough:0,between:0,attribut:0,hddtemperatur:0,august:[],extend:0,screen:0,job:0,addit:0,etc:0,com:0,load:0,simpli:0,color:0,period:0,header:0,rpc:0,linux:0,batteri:0,nicola:0,quit:0,three:0,sinc:0,json:0,quickli:0,present:0,mount:0,aim:0,defin:0,"while":0,abov:0,mandatori:0,glanc:[0,1],list_1_countmin:0,virt:0,conf:0,nicolargo:0,avg:0,welcom:1,minim:0,cross:[0,1],html:0,nosheep:0,document:[0,1],higher:0,finish:0,http:0,hostnam:0,iow:0,ior:0,alert:0,user:0,php:0,exampl:0,command:[0,1],thi:0,filesystem:0,left:0,just:0,percent:0,tcp:0,speed:0,web:0,except:0,blog:0,add:0,els:0,applic:[0,1],read:0,howto:0,nginx:0,temperatur:0,biz:0,press:0,bit:0,password:0,daemon:0,resid:0,manual:0,server:0,kbit:0,output:0,nice:0,page:1,www:0,some:[0,1],percentag:0,intern:1,librari:[0,1],bottom:0,definit:0,per:0,pysensor:0,exit:0,refer:[0,1],machin:0,core:0,plu:0,run:0,bold:0,usag:[0,1],column:0,roam:0,disabl:0,countmax:0,automat:0,mbp:0,your:[0,1],log:0,support:[0,1],avail:[0,1],start:0,interfac:0,ipv4:0,ipv6:0,newer:0,line:0,bug:0,count:0,"default":0,displai:0,limit:0,embed:0,featur:0,curs:[0,1],classic:0,pid:0,"char":0,novemb:0,file:0,vista:0,tip:0,virtual:[],you:0,architectur:0,stat:0,easili:0,furthermor:0,directori:0,descript:0,getallmonitor:0,time:0,cpu:0},objtypes:{},titles:["Glances","Welcome to Glances’s documentation!"],objnames:{},filenames:["glances-doc","index"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{represent:0,all:0,code:2,appdata:0,global:0,sleep:0,follow:0,disk:0,compact:0,middl:0,depend:0,program:0,swap:0,under:0,load1:0,list_1_command:0,sourc:2,string:0,iowait:0,trough:0,pocess:[],level:0,list:0,item:0,rate:0,port:0,compat:0,index:[2,1],hide:0,sum:0,access:0,delet:0,version:0,"new":0,net:0,method:0,full:0,mem:0,batinfo:0,here:0,address:0,path:0,legend:0,valu:0,wait:0,search:[2,1],queue:0,throughput:0,list_1_countmax:0,modul:[0,1,2],unix:0,api:[0,2],xdg_config_hom:0,instal:0,total:0,unit:0,regex:0,from:[0,2],describ:0,memori:0,two:0,call:0,usr:0,sort:0,warn:0,flag:0,load5:0,setup:0,work:0,can:0,root:0,overrid:0,prompt:0,process:0,indic:[2,1],critic:0,minimum:0,caution:0,want:0,magenta:0,occur:0,end:0,fpm:0,anoth:0,uptim:0,write:0,how:0,csv:0,css:0,load15:0,max:0,date:0,data:0,averag:0,github:[0,2],footer:0,bind:0,countmin:0,issu:0,inform:[0,2],"switch":0,curent:[],green:0,allow:0,ethernet:0,order:0,hennion:0,cyberc:0,help:0,over:0,privileg:0,dynam:0,group:0,monitor:[0,2],fit:0,platform:[0,2],window:0,good:0,"return":0,python:[0,2],interrupt:0,introduct:[0,2],name:0,refresh:0,psutil:[0,2],mode:0,each:0,found:0,side:0,idel:0,hard:0,connect:0,http:0,shown:0,network:0,space:0,content:[0,1,2],adapt:0,sensor:0,red:0,free:0,standalon:0,base:[0,2],zombi:0,releas:0,"byte":0,care:0,mbit:0,thread:0,filter:0,summari:0,first:0,softwar:0,feel:0,number:0,system:[0,2],mai:0,messag:0,size:0,sheep:0,given:0,script:0,interact:0,mkdir:0,capac:0,least:0,stori:0,cumul:0,termin:0,listen:0,shell:0,consol:0,option:0,tool:[0,2],copi:0,"short":0,hddtemp:0,list_1_regex:0,than:0,rss:0,remot:0,second:0,horizont:0,were:0,consumpt:0,minut:0,zachari:0,counter:0,ran:0,ram:0,have:0,tabl:[0,1,2],need:0,min:0,note:0,also:0,ideal:0,client:0,which:0,combin:0,singl:0,anatomi:[0,2],blue:0,trace:0,track:0,regular:0,"80x24":0,bsd:0,request:0,drive:0,section:0,show:0,xml:0,current:0,onli:0,locat:0,execut:0,copyright:0,configur:[0,2],written:[0,2],should:0,folder:0,local:0,overwritten:0,hit:0,contribut:0,get:[0,2],express:0,stop:0,report:0,requir:0,enabl:0,statist:0,through:0,grab:0,septemb:[],where:0,view:0,wiki:0,kernel:0,set:0,displai:0,see:0,sec:0,statu:0,extend:0,list_1_descript:0,irq:0,enough:0,between:0,attribut:0,hddtemperatur:0,august:[],kei:0,screen:0,job:0,addit:0,img:0,etc:0,com:0,load:0,simpli:0,color:0,period:0,header:0,rpc:0,linux:0,batteri:0,nicola:0,quit:0,three:0,sinc:0,json:0,quickli:0,present:0,mount:0,aim:0,defin:0,"while":0,abov:0,mandatori:0,file:0,list_1_countmin:0,virt:0,conf:0,nicolargo:0,avg:0,welcom:[2,1],minim:0,cross:[0,2],html:0,nosheep:0,document:[0,1,2],higher:0,finish:0,tirrel:0,hostnam:0,iow:0,ior:0,alert:0,user:0,php:0,task:0,exampl:0,command:[0,2],thi:0,filesystem:0,left:0,just:0,tip:0,tcp:0,speed:0,web:0,except:0,blog:0,add:0,els:0,applic:[0,2],read:0,howto:0,nginx:0,temperatur:0,biz:0,press:0,bit:0,password:0,daemon:0,resid:0,manual:0,server:0,kbit:0,output:[0,2],architectur:0,page:[2,1],www:0,some:[0,2],percentag:0,intern:2,"export":0,librari:[0,2],tmp:0,bottom:0,definit:0,thank:0,per:0,pysensor:0,exit:0,ipv4:0,refer:[0,2],machin:0,core:0,plu:0,run:0,bold:0,usag:[0,2],januari:0,column:0,roam:0,disabl:0,countmax:0,automat:0,mbp:0,your:[0,2],log:0,support:[0,2],avail:[0,2],start:0,interfac:0,low:0,ipv6:0,newer:0,line:0,bug:0,count:0,possibl:0,"default":0,maximum:0,limit:0,embed:0,featur:0,curs:[0,2],classic:0,pid:0,"char":0,novemb:[],glanc:[0,1,2],vista:0,percent:0,virtual:[],other:[0,2],you:0,nice:0,stat:0,easili:0,furthermor:0,directori:0,descript:0,getallmonitor:0,time:0,cpu:0},objtypes:{},titles:["Glances","Welcome to Glances’s documentation!","Welcome to Glances’s documentation!"],objnames:{},filenames:["glances-doc","vi index.rst\rmake html\rcd ..\r/index","index"]}) \ No newline at end of file diff --git a/docs/glances-doc.html b/docs/glances-doc.html index 9cfb514d..c865e9af 100644 --- a/docs/glances-doc.html +++ b/docs/glances-doc.html @@ -123,9 +123,9 @@ td.option-group {

    Glances

    -

    This manual describes Glances version 1.7.3.

    -

    Copyright © 2012-2013 Nicolas Hennion <nicolas@nicolargo.com>

    -

    November 2013

    +

    This manual describes Glances version 1.7.4.

    +

    Copyright © 2012-2014 Nicolas Hennion <nicolas@nicolargo.com>

    +

    January 2014

    Table of Contents

      @@ -158,7 +158,8 @@ td.option-group {
  • API documentation
  • -
  • Support
  • +
  • Others outputs
  • +
  • Support
  • @@ -331,7 +332,7 @@ just run on the server:

    Configuration

    No configuration file is mandatory to use Glances.

    -

    Furthermore a configuration file is needed for setup limits and/or monitored processes list.

    +

    Furthermore a configuration file is needed for setup limits, disks or network interfaces to hide and/or monitored processes list.

    By default, the configuration file is under:

    @@ -376,7 +377,7 @@ cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/
    @@ -446,6 +447,7 @@ if the bit rate is higher than 70 Mbps.

    If bit rate is >70%, then status is set to "WARNING"
    If bit rate is >90%, then status is set to "CRITICAL"
    +

    Note: In the configuration file, you can define a list of network interfaces to hide.

    Sensors

    @@ -470,6 +472,7 @@ if the bit rate is higher than 70 Mbps.

    images/diskio.png

    Glances displays the disk I/O throughput. The unit is adapted dynamically.

    Note: There is no alert on this information.

    +

    Note: In the configuration file, you can define a list of disk to hide.

    File system

    @@ -497,6 +500,14 @@ adapted dynamically.

  • Optional monitored processes list (new in 1.7)
  • Processes list
  • +

    The processes summary line display:

    +
      +
    • Tasks number (total number of processes)
    • +
    • Threads number
    • +
    • Running tasks number
    • +
    • Sleeping tasks number
    • +
    • Other tasks number (not running or sleeping)
    • +

    By default, or if you hit the a key, the processes list is automatically sorted by CPU of memory usage.

    Note: limit values can be overwritten in the configuration file under the [process] section.

    @@ -623,8 +634,26 @@ is installed on your system then Glances displays the available percent capacity

    Glances uses a XML-RPC server and can be used by another client software.

    API documentation is available at https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To

    +
    +

    Others outputs

    +

    Thanks to the -o option, it is possible to export statistics to CSV or HTML files.

    +
    +$ glances -o CSV -f /tmp/glances.csv
    +
    +

    CSV files have on line per stats:

    +
      +
    • load,load1,load5,load15
    • +
    • mem,total,used,free
    • +
    • swap,total,used,free
    • +
    • cpu,user,system,nice,idel,iowait,irq
    • +
    +
    +$ glances -o HTML -f /tmp
    +
    +

    Note: The css and img folders (glances/data) should be in the /tmp folder

    +
    -

    Support

    +

    Support

    To report a bug or a feature request use the bug tracking system at https://github.com/nicolargo/glances/issues

    Feel free to contribute!

    diff --git a/glances/glances.py b/glances/glances.py index 07cfd542..de7df822 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -3,7 +3,7 @@ # # Glances - An eye on your system # -# Copyright (C) 2013 Nicolargo +# Copyright (C) 2014 Nicolargo # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -19,7 +19,7 @@ # along with this program. If not, see . __appname__ = 'glances' -__version__ = "1.7.4_RC1" +__version__ = "1.7.4" __author__ = "Nicolas Hennion " __licence__ = "LGPL" @@ -4654,15 +4654,7 @@ def main(): client_tag = True server_ip = arg elif opt in ("-p", "--port"): - try: - port_number = int(arg) - except: - print("Error: Invalid port number (%s)" % arg) - sys.exit(2) - if (port_number < 1) or (port_number > 65535): - print(_("Error: Port number should be a positive integer (1 <-> 65535)")) - sys.exit(2) - server_port = port_number + server_port = arg elif opt in ("-o", "--output"): if arg.lower() == "html": html_tag = True @@ -4788,8 +4780,12 @@ def main(): # Init Glances depending of the mode (standalone, client, server) if server_tag: # Init the server + try: + server = GlancesServer(bind_ip, int(server_port), GlancesXMLRPCHandler, cached_time) + except (ValueError, socket.error) as err: + print(_("Error: Invalid port number: %s") % err) + sys.exit(2) print(_("Glances server is running on") + " %s:%s" % (bind_ip, server_port)) - server = GlancesServer(bind_ip, int(server_port), GlancesXMLRPCHandler, cached_time) # Set the server login/password (if -P/--password tag) if password != "": @@ -4806,7 +4802,11 @@ def main(): stats.update({}) elif client_tag: # Init the client (displaying server stat in the CLI) - client = GlancesClient(server_ip, int(server_port), username, password) + try: + client = GlancesClient(server_ip, int(server_port), username, password) + except (ValueError, socket.error) as err: + print(_("Error: Invalid port number: %s") % err) + sys.exit(2) # Test if client and server are in the same major version if not client.client_init(): -- cgit v1.2.3