Merge remote-tracking branch 'upstream/master'

This commit is contained in:
asergi 2012-12-15 23:05:00 +01:00
commit a70ac3a4e3
4 changed files with 51 additions and 17 deletions

28
.gitignore vendored
View File

@ -6,3 +6,31 @@
*.egg-info *.egg-info
dist dist
build build
# Eclipse
*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath

View File

@ -1436,7 +1436,7 @@ class glancesScreen:
# Is it possible to display extended stats ? # Is it possible to display extended stats ?
# If yes then tag_extendedcpu = True # If yes then tag_extendedcpu = True
tag_extendedcpu = screen_x > self.cpu_x + 79 + 15 tag_extendedcpu = screen_x > self.cpu_x + 79 + 14
# Is it possible to display per-CPU stats ? # Is it possible to display per-CPU stats ?
# Do you want it ? # Do you want it ?
@ -2072,7 +2072,7 @@ class glancesScreen:
tag_status = True tag_status = True
if screen_x > process_x + 77: if screen_x > process_x + 77:
tag_proc_time = True tag_proc_time = True
if screen_x > process_x + 97: if screen_x > process_x + 92:
tag_io = True tag_io = True
if not psutil_get_io_counter_tag: if not psutil_get_io_counter_tag:
@ -2127,17 +2127,17 @@ class glancesScreen:
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 2, process_x + process_name_x, self.process_y + 2, process_x + process_name_x,
format(_("TIME+"), '>8'), 8) format(_("TIME+"), '>8'), 8)
process_name_x += 9 process_name_x += 10
# IO # IO
if tag_io: if tag_io:
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 2, process_x + process_name_x, self.process_y + 2, process_x + process_name_x,
format(_("IO_R"), '>6'), 6) format(_("IO_R"), '>4'), 4)
process_name_x += 7 process_name_x += 6
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 2, process_x + process_name_x, self.process_y + 2, process_x + process_name_x,
format(_("IO_W"), '>6'), 6) format(_("IO_W"), '>4'), 4)
process_name_x += 7 process_name_x += 6
# PROCESS NAME # PROCESS NAME
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 2, process_x + process_name_x, self.process_y + 2, process_x + process_name_x,
@ -2227,22 +2227,22 @@ class glancesScreen:
try: try:
if processlist[processes]['io_counters'] == {}: if processlist[processes]['io_counters'] == {}:
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 3 + processes, process_x + 56, self.process_y + 3 + processes, process_x + 57,
_("A_DENY"), 6) " ?", 4)
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 3 + processes, process_x + 63, self.process_y + 3 + processes, process_x + 63,
_("A_DENY"), 6) " ?", 4)
else: else:
# Processes are only refresh every 2 refresh_time # Processes are only refresh every 2 refresh_time
#~ elapsed_time = max(1, self.__refresh_time) * 2 #~ elapsed_time = max(1, self.__refresh_time) * 2
io_read = processlist[processes]['io_counters'][2] io_read = processlist[processes]['io_counters'][2]
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 3 + processes, process_x + 56, self.process_y + 3 + processes, process_x + 57,
format(self.__autoUnit(io_read), '>6'), 6) format(self.__autoUnit(io_read), '>4'), 4)
io_write = processlist[processes]['io_counters'][3] io_write = processlist[processes]['io_counters'][3]
self.term_window.addnstr( self.term_window.addnstr(
self.process_y + 3 + processes, process_x + 63, self.process_y + 3 + processes, process_x + 63,
format(self.__autoUnit(io_write), '>6'), 6) format(self.__autoUnit(io_write), '>4'), 4)
except: except:
pass pass

View File

@ -69,7 +69,13 @@ class TestGlancesStat(unittest.TestCase):
self.stats.update() self.stats.update()
memswap = self.stats.getMemSwap() memswap = self.stats.getMemSwap()
print "MemSwap stat %s:" % memswap print "MemSwap stat %s:" % memswap
self.assertTrue(len(self.stats.getMemSwap()) > 2) self.assertTrue(len(memswap) > 2)
def test_Glances_getNetwork(self):
self.stats.update()
net = self.stats.getNetwork()
print "Network stat %s:" % net
self.assertTrue(len(net) > 1)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -24,7 +24,7 @@ for mo in glob('i18n/*/LC_MESSAGES/*.mo'):
setup(name='Glances', setup(name='Glances',
version='1.5.1', version='1.5.1',
download_url='https://github.com/downloads/nicolargo/glances/glances-1.5.1.tar.gz', download_url='https://s3.amazonaws.com/glances/glances-1.5.1.tar.gz',
url='https://github.com/nicolargo/glances', url='https://github.com/nicolargo/glances',
description='CLI curses-based monitoring tool', description='CLI curses-based monitoring tool',
author='Nicolas Hennion', author='Nicolas Hennion',