From 7d088eeef9cc4b0b0b96acdd5cdda77a341002f0 Mon Sep 17 00:00:00 2001 From: Saipraneethmaddi Date: Thu, 7 Nov 2019 12:42:06 +0530 Subject: [PATCH 1/3] New features like GPU usage chart, GPU temperature, CPU temperature have been added --- ptop/interfaces/GUI.py | 71 ++++++++++++++++++++++++++++------ ptop/main.py | 34 +++++++++++++++- ptop/plugins/__init__.py | 4 ++ ptop/plugins/cpu_sensor.py | 2 +- ptop/plugins/memory_sensor.py | 4 +- ptop/plugins/process_sensor.py | 2 +- 6 files changed, 100 insertions(+), 17 deletions(-) diff --git a/ptop/interfaces/GUI.py b/ptop/interfaces/GUI.py index c55f268..a455582 100644 --- a/ptop/interfaces/GUI.py +++ b/ptop/interfaces/GUI.py @@ -311,6 +311,7 @@ def __init__(self,statistics,stop_event,arg,sensor_refresh_rates): self.basic_stats = None self.memory_chart = None self.cpu_chart = None + self.gpu_chart = None self.processes_table = None # Actions bar @@ -327,6 +328,7 @@ def __init__(self,statistics,stop_event,arg,sensor_refresh_rates): self.CHART_HEIGHT = None self.CHART_WIDTH = None self.cpu_array = None + self.gpu_array = None self.memory_array = None # logger @@ -348,6 +350,8 @@ def draw_chart(self,canvas,y,chart_type): ''' if chart_type == 'cpu': chart_array = self.cpu_array + elif chart_type == 'gpu': + chart_array = self.gpu_array else: chart_array = self.memory_array @@ -409,7 +413,9 @@ def update(self): processes_info = self.statistics['Process']['text'] system_info = self.statistics['System']['text'] cpu_info = self.statistics['CPU']['graph'] + gpu_info = self.statistics['GPU']['graph'] network_info = self.statistics['Network']['text'] + temp_info = self.statistics['Temperature']['text'] #### Overview information #### @@ -433,11 +439,19 @@ def update(self): str(system_info["running_time"]), " "*int(4*self.X_SCALING_FACTOR), " "*int(9*self.X_SCALING_FACTOR)) - row4 = "Network Speed {2}{0: <3}↓ {1: <3}↑ MB/s".format(network_info["download_speed_in_mb"], - network_info["upload_speed_in_mb"], - " "*int(4*self.X_SCALING_FACTOR), - " "*int(9*self.X_SCALING_FACTOR)) - + if(self.statistics['GPU']['text']['number_of_gpus']==0): + row4 = "Network Speed {2}{0: <3}↓ {1: <3}↑ MB/s".format(network_info["download_speed_in_mb"], + network_info["upload_speed_in_mb"], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + else: + row4 = "Network Speed {4}{0: <3}↓ {1: <3}↑ MB/s{5}{5} Temperatures GPU:{2},CPU:{3: <8}".format(network_info["download_speed_in_mb"], + network_info["upload_speed_in_mb"], + self.statistics['GPU']['text']['temperature'], + temp_info['temp'], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + self.basic_stats.value = row1 + '\n' + row2 + '\n' + row3 + '\n' + row4 # Lazy update to GUI self.basic_stats.update(clear=True) @@ -457,6 +471,13 @@ def update(self): self.memory_chart.value = self.draw_chart(memory_canvas,next_peak_height,'memory') self.memory_chart.update(clear=True) + #### GPU Usage information #### + + gpu_canvas = drawille.Canvas() + next_peak_height = int(math.ceil((float(gpu_info['percentage'])/100)*self.CHART_HEIGHT)) + self.gpu_chart.value = (self.draw_chart(gpu_canvas,next_peak_height,'gpu')) + self.gpu_chart.update(clear=True) + #### Processes table #### self._processes_data = self.statistics['Process']['table'] @@ -478,14 +499,15 @@ def update(self): # to keep things pre computed curtailed_processes_data = [] for proc in sorted_processes_data: - curtailed_processes_data.append("{0: <30} {1: >5}{6}{2: <10}{6}{3}{6}{4: >6.2f} % {6}{5}\ + curtailed_processes_data.append("{0: <30} {1: >5}{6}{2: <10}{6}{3}{6}{4: >6.2f} % {6}{7: >6.2f} % {6}{5}\ ".format( (proc['name'][:25] + '...') if len(proc['name']) > 25 else proc['name'], proc['id'], proc['user'], proc['time'], proc['memory'], proc['local_ports'], - " "*int(5*self.X_SCALING_FACTOR)) + " "*int(3*self.X_SCALING_FACTOR), + proc['cpu']) ) if not self.processes_table.entry_widget.is_filtering_on(): self.processes_table.entry_widget.values = curtailed_processes_data @@ -508,8 +530,8 @@ def draw(self): self.window = WindowForm(parentApp=self, name="ptop [http://darxtrix.in/ptop]" ) - MIN_ALLOWED_TERMINAL_WIDTH = 104 - MIN_ALLOWED_TERMINAL_HEIGHT = 28 + MIN_ALLOWED_TERMINAL_WIDTH = 52 + MIN_ALLOWED_TERMINAL_HEIGHT = 14 # Setting the terminal dimensions by querying the underlying curses library self._logger.info("Detected terminal size to be {0}".format(self.window.curses_pad.getmaxyx())) @@ -521,7 +543,7 @@ def draw(self): # Also make ptop exists cleanly if screen is drawn beyond the lower limit if max_x < MIN_ALLOWED_TERMINAL_WIDTH or \ max_y < MIN_ALLOWED_TERMINAL_HEIGHT: - self._logger.info("Terminal sizes than width = 104 and height = 28, exiting") + self._logger.info("Terminal sizes less than width = 104 and height = 28, exiting") sys.stdout.write("Ptop does not support terminals with resolution smaller than 104*28. Please resize your terminal and try again.") raise KeyboardInterrupt @@ -561,7 +583,10 @@ def draw(self): MEMORY_USAGE_WIDGET_REL_X = LEFT_OFFSET MEMORY_USAGE_WIDGET_REL_Y = OVERVIEW_WIDGET_REL_Y + OVERVIEW_WIDGET_HEIGHT MEMORY_USAGE_WIDGET_HEIGHT = int(10*self.Y_SCALING_FACTOR) - MEMORY_USAGE_WIDGET_WIDTH = int(50*self.X_SCALING_FACTOR) + if(self.statistics['GPU']['text']['number_of_gpus']>0): + MEMORY_USAGE_WIDGET_WIDTH = int(35*self.X_SCALING_FACTOR) + else: + MEMORY_USAGE_WIDGET_WIDTH = int(50*self.X_SCALING_FACTOR) self._logger.info("Trying to draw Memory Usage information box, x1 {0} x2 {1} y1 {2} y2 {3}".format(MEMORY_USAGE_WIDGET_REL_X, MEMORY_USAGE_WIDGET_REL_X+MEMORY_USAGE_WIDGET_WIDTH, MEMORY_USAGE_WIDGET_REL_Y, @@ -597,6 +622,27 @@ def draw(self): ) self.cpu_chart.value = "" self.cpu_chart.entry_widget.editable = False + + ###### GPU Usage widget ######### + if(self.statistics['GPU']['text']['number_of_gpus']>0): + GPU_USAGE_WIDGET_REL_X = CPU_USAGE_WIDGET_REL_X + CPU_USAGE_WIDGET_WIDTH + GPU_USAGE_WIDGET_REL_Y = MEMORY_USAGE_WIDGET_REL_Y + GPU_USAGE_WIDGET_HEIGHT = MEMORY_USAGE_WIDGET_HEIGHT + GPU_USAGE_WIDGET_WIDTH = int(30*self.X_SCALING_FACTOR) + self._logger.info("Trying to draw CPU Usage information box, x1 {0} x2 {1} y1 {2} y2 {3}".format(GPU_USAGE_WIDGET_REL_X, + GPU_USAGE_WIDGET_REL_X+GPU_USAGE_WIDGET_WIDTH, + GPU_USAGE_WIDGET_REL_Y, + GPU_USAGE_WIDGET_REL_Y+GPU_USAGE_WIDGET_HEIGHT) + ) + self.gpu_chart = self.window.add(MultiLineWidget, + name="GPU Usage", + relx=GPU_USAGE_WIDGET_REL_X, + rely=GPU_USAGE_WIDGET_REL_Y, + max_height=GPU_USAGE_WIDGET_HEIGHT, + max_width=GPU_USAGE_WIDGET_WIDTH + ) + self.gpu_chart.value = "" + self.gpu_chart.entry_widget.editable = False ###### Processes Info widget ######### @@ -610,7 +656,7 @@ def draw(self): PROCESSES_INFO_WIDGET_REL_Y+PROCESSES_INFO_WIDGET_HEIGHT) ) self.processes_table = self.window.add(MultiLineActionWidget, - name="Processes ( name - PID - user - age - memory - system_ports )", + name="Processes ( name - PID - user - age - memory - cpu - system_ports )", relx=PROCESSES_INFO_WIDGET_REL_X, rely=PROCESSES_INFO_WIDGET_REL_Y, max_height=PROCESSES_INFO_WIDGET_HEIGHT, @@ -655,6 +701,7 @@ def draw(self): # fix for index error self.cpu_array = [0]*self.CHART_WIDTH self.memory_array = [0]*self.CHART_WIDTH + self.gpu_array = [0]*self.CHART_WIDTH # add subwidgets to the parent widget self.window.edit() diff --git a/ptop/main.py b/ptop/main.py index 63dc526..0c9ad4c 100644 --- a/ptop/main.py +++ b/ptop/main.py @@ -157,6 +157,34 @@ def main(): For example 500 ''') + parser.add_argument('-gsrt', + dest='gsrt', + action='store', + type=float, + required=False, + help= + ''' + GPU sensor response time; + Input sensor + update interval in + milli seconds less than 1000. + For example 500 + ''') + + parser.add_argument('-tsrt', + dest='tsrt', + action='store', + type=float, + required=False, + help= + ''' + Temperature sensor response time; + Input sensor + update interval in + milli seconds less than 1000. + For example 500 + ''') + parser.add_argument('-v', action='version', version='ptop {}'.format(__version__)) @@ -175,9 +203,13 @@ def main(): psrt = (1000 if psrt>1000 else psrt) ssrt = (results.ssrt if results.ssrt else 1000) ssrt = (1000 if ssrt>1000 else ssrt) + gsrt = (results.gsrt if results.gsrt else 1000) + gsrt = (1000 if gsrt>1000 else gsrt) + tsrt = (results.tsrt if results.tsrt else 1000) + tsrt = (1000 if tsrt>1000 else tsrt) nsrt = 1000 # network sensor rate is always 1 second - srts = [csrt, dsrt, msrt, nsrt, psrt, ssrt] + srts = [csrt, dsrt, msrt, nsrt, psrt, ssrt, gsrt, tsrt] sensor_refresh_rates = {SENSORS_LIST[i]: srts[i] for i in range(len(SENSORS_LIST))} # try to update ptop diff --git a/ptop/plugins/__init__.py b/ptop/plugins/__init__.py index f2be931..a7ee271 100644 --- a/ptop/plugins/__init__.py +++ b/ptop/plugins/__init__.py @@ -8,6 +8,8 @@ from .process_sensor import process_sensor from .system_sensor import system_sensor from .network_sensor import network_sensor +from .gpu_sensor import gpu_sensor +from .temperature_sensor import temperature_sensor # Sensors List SENSORS_LIST = [ @@ -17,4 +19,6 @@ network_sensor, process_sensor, system_sensor, + gpu_sensor, + temperature_sensor, ] diff --git a/ptop/plugins/cpu_sensor.py b/ptop/plugins/cpu_sensor.py index 0ce789b..6a1939e 100644 --- a/ptop/plugins/cpu_sensor.py +++ b/ptop/plugins/cpu_sensor.py @@ -13,7 +13,7 @@ def __init__(self,**kwargs): # there can be many text (key,value) pairs to display corresponding to each key self.currentValue['text'] = {} # there will be one averaged value - self.currentValue['graph'] = {'percentage' : ''} + self.currentValue['graph'] = {'percentage' : 0} # overriding the update method def update(self): diff --git a/ptop/plugins/memory_sensor.py b/ptop/plugins/memory_sensor.py index 0a07f54..9476526 100644 --- a/ptop/plugins/memory_sensor.py +++ b/ptop/plugins/memory_sensor.py @@ -13,7 +13,7 @@ def __init__(self,**kwargs): # there can be many text (key,value) pairs to display corresponding to each key self.currentValue['text'] = { 'memory' : {},'swap_memory' : {}} # there will be only one graph info - self.currentValue['graph'] = {'percentage' : ''} + self.currentValue['graph'] = {'percentage' : 0} # overriding the update method def update(self): @@ -22,7 +22,7 @@ def update(self): self.currentValue['text']['memory']['total'] = int(float(vmem.total)/(1024*1024)) self.currentValue['text']['memory']['active'] = int(float(vmem.active)/(1024*1024)) self.currentValue['text']['memory']['percentage'] = int(vmem.percent) - self.currentValue['graph']['percentage'] = int(vmem.percent) + self.currentValue['graph']['percentage'] = vmem.percent # swap memory smem = psutil.swap_memory() self.currentValue['text']['swap_memory']['total'] = int(float(smem.total)/(1024*1024)) diff --git a/ptop/plugins/process_sensor.py b/ptop/plugins/process_sensor.py index 0569c21..ed1943f 100644 --- a/ptop/plugins/process_sensor.py +++ b/ptop/plugins/process_sensor.py @@ -61,7 +61,7 @@ def update(self): proc_info['command'] = ' '.join(p.cmdline()) # incrementing the thread_count and proc_count thread_count += p.num_threads() - proc_info['cpu'] = p.cpu_percent() + proc_info['cpu'] = round(p.cpu_percent(interval=0.01),2) proc_info['memory'] = round(p.memory_percent(),2) # Add information of the local ports used by the process proc_info['local_ports'] = [x.laddr[1] for x in p.connections()] From ce0db2eacda2867afae699420c75dd96082a05d3 Mon Sep 17 00:00:00 2001 From: Saipraneethmaddi Date: Thu, 7 Nov 2019 12:43:24 +0530 Subject: [PATCH 2/3] New features like GPU usage chart, GPU temperature, CPU temperature have been added --- ptop/plugins/gpu_sensor.py | 39 ++++++++++++++++++++++++++++++ ptop/plugins/temperature_sensor.py | 24 ++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 ptop/plugins/gpu_sensor.py create mode 100644 ptop/plugins/temperature_sensor.py diff --git a/ptop/plugins/gpu_sensor.py b/ptop/plugins/gpu_sensor.py new file mode 100644 index 0000000..29f35f5 --- /dev/null +++ b/ptop/plugins/gpu_sensor.py @@ -0,0 +1,39 @@ +#-*- coding: utf-8 -*- +''' + GPU sensor plugin + + Generates the GPU usage stats +''' +from ptop.core import Plugin +import GPUtil,subprocess + +class GPUSensor(Plugin): + def __init__(self,**kwargs): + super(GPUSensor,self).__init__(**kwargs) + # there will be two parts of the returned value, one will be text and other graph + # there can be many text (key,value) pairs to display corresponding to each key + self.currentValue['text'] = {'number_of_gpus' : len(GPUtil.getGPUs()), 'temperature' : ''} + # there will be one averaged value + self.currentValue['graph'] = {'percentage' : 0} + + # overriding the update method + def update(self): + # gpu usage + gpus = GPUtil.getGPUs() + num_gpus = len(gpus) + gpu_usage = [x.load for x in gpus] + self.currentValue['text']['number_of_gpus'] = num_gpus + for ctr in range(num_gpus): + self.currentValue['text']['gpu{0}'.format(ctr+1)] = gpu_usage[ctr] + #average gpu usage + if(num_gpus!=0): + self.currentValue['graph']['percentage'] = (sum(gpu_usage)*100)/num_gpus + proc = subprocess.Popen('nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader', + stdout=subprocess.PIPE,stderr=subprocess.STDOUT,shell=True) + output,error = proc.communicate() + temp = output.split()[0] + self.currentValue['text']['temperature']=temp+'°C' + else: + self.currentValue['graph']['percentage'] = 0 + +gpu_sensor = GPUSensor(name='GPU',sensorType='chart',interval=0.5) \ No newline at end of file diff --git a/ptop/plugins/temperature_sensor.py b/ptop/plugins/temperature_sensor.py new file mode 100644 index 0000000..c795b7c --- /dev/null +++ b/ptop/plugins/temperature_sensor.py @@ -0,0 +1,24 @@ +#-*- coding: utf-8 -*- +''' + Temperature sensor plugin + + Generates the Temperature usage stats +''' +from ptop.core import Plugin +import psutil + +class TemperatureSensor(Plugin): + def __init__(self,**kwargs): + super(TemperatureSensor,self).__init__(**kwargs) + self.currentValue['text'] = {} + + # overriding the update method + def update(self): + # temperature usage + temperature = psutil.sensors_temperatures(fahrenheit=False) + cpu_temp = temperature["coretemp"][0].current + # update the temperature + self.currentValue['text']['temp'] = str(cpu_temp)+'°C' + + +temperature_sensor = TemperatureSensor(name='Temperature',sensorType='text',interval=0.5) \ No newline at end of file From 36e4cf6dc77918fb05ed53e65962ab3a84a1f658 Mon Sep 17 00:00:00 2001 From: Saipraneethmaddi Date: Thu, 7 Nov 2019 13:56:35 +0530 Subject: [PATCH 3/3] Overview widget divided into two widgets to display GPU,CPU temperatures without effecting the rest --- ptop/interfaces/GUI.py | 74 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/ptop/interfaces/GUI.py b/ptop/interfaces/GUI.py index a455582..91198bc 100644 --- a/ptop/interfaces/GUI.py +++ b/ptop/interfaces/GUI.py @@ -308,7 +308,8 @@ def __init__(self,statistics,stop_event,arg,sensor_refresh_rates): self.window = None # Widgets - self.basic_stats = None + self.basic_stats1 = None + self.basic_stats2 = None self.memory_chart = None self.cpu_chart = None self.gpu_chart = None @@ -426,6 +427,16 @@ def update(self): " "*int(4*self.X_SCALING_FACTOR), " "*int(9*self.X_SCALING_FACTOR)) + row11 = "Disk Usage (/) {3}{0: <6}/{1: >6} MB{3}{2: >2} %".format(disk_info["used"], + disk_info["total"], + disk_info["percentage"], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + + row12 = "Processes{1}{0: <8}".format(processes_info["running_processes"], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + row2 = "Swap Memory {4}{0: <6}/{1: >6} MB{4}{2: >2} %{5}Threads {4}{3: <8}".format(swap_info["active"], swap_info["total"], swap_info["percentage"], @@ -433,28 +444,54 @@ def update(self): " "*int(4*self.X_SCALING_FACTOR), " "*int(9*self.X_SCALING_FACTOR)) + row21 = "Swap Memory {3}{0: <6}/{1: >6} MB{3}{2: >2} %".format(swap_info["active"], + swap_info["total"], + swap_info["percentage"], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + + row22 = "Threads {1}{0: <8}".format(processes_info["running_threads"], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + row3 = "Main Memory {4}{0: <6}/{1: >6} MB{4}{2: >2} %{5}Boot Time{4}{3: <8} hours".format(memory_info["active"], memory_info["total"], memory_info["percentage"], str(system_info["running_time"]), " "*int(4*self.X_SCALING_FACTOR), " "*int(9*self.X_SCALING_FACTOR)) - if(self.statistics['GPU']['text']['number_of_gpus']==0): - row4 = "Network Speed {2}{0: <3}↓ {1: <3}↑ MB/s".format(network_info["download_speed_in_mb"], + + row31 = "Main Memory {3}{0: <6}/{1: >6} MB{3}{2: >2} %".format(memory_info["active"], + memory_info["total"], + memory_info["percentage"], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + + row32 = "Boot Time{1}{0: <8} hours".format(str(system_info["running_time"]), + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) + + row41 = "Network Speed {2}{0: <3}↓ {1: <3}↑ MB/s".format(network_info["download_speed_in_mb"], network_info["upload_speed_in_mb"], " "*int(4*self.X_SCALING_FACTOR), " "*int(9*self.X_SCALING_FACTOR)) + + if(self.statistics['GPU']['text']['number_of_gpus']==0): + row42 = "Temperatures{1}CPU:{0: <8}".format( + temp_info['temp'], + " "*int(4*self.X_SCALING_FACTOR), + " "*int(9*self.X_SCALING_FACTOR)) else: - row4 = "Network Speed {4}{0: <3}↓ {1: <3}↑ MB/s{5}{5} Temperatures GPU:{2},CPU:{3: <8}".format(network_info["download_speed_in_mb"], - network_info["upload_speed_in_mb"], - self.statistics['GPU']['text']['temperature'], + row42 = "Temperatures{2}GPU:{0},CPU:{1: <8}".format(self.statistics['GPU']['text']['temperature'], temp_info['temp'], " "*int(4*self.X_SCALING_FACTOR), " "*int(9*self.X_SCALING_FACTOR)) - self.basic_stats.value = row1 + '\n' + row2 + '\n' + row3 + '\n' + row4 + self.basic_stats1.value = row11 + '\n' + row21 + '\n' + row31 + '\n' + row41 + self.basic_stats2.value = row12 + '\n' + row22 + '\n' + row32 + '\n' + row42 # Lazy update to GUI - self.basic_stats.update(clear=True) + self.basic_stats1.update(clear=True) + self.basic_stats2.update(clear=True) #### CPU Usage information #### @@ -562,21 +599,30 @@ def draw(self): OVERVIEW_WIDGET_REL_Y = TOP_OFFSET # equivalent to math.ceil => [ int(109.89) = 109 ] OVERVIEW_WIDGET_HEIGHT = int(6*self.Y_SCALING_FACTOR) - OVERVIEW_WIDGET_WIDTH = int(100*self.X_SCALING_FACTOR) + OVERVIEW_WIDGET_WIDTH = int(50*self.X_SCALING_FACTOR) self._logger.info("Trying to draw Overview information box, x1 {0} x2 {1} y1 {2} y2 {3}".format(OVERVIEW_WIDGET_REL_X, OVERVIEW_WIDGET_REL_X+OVERVIEW_WIDGET_WIDTH, OVERVIEW_WIDGET_REL_Y, OVERVIEW_WIDGET_REL_Y+OVERVIEW_WIDGET_HEIGHT) ) - self.basic_stats = self.window.add(MultiLineWidget, - name="Overview", + self.basic_stats1 = self.window.add(MultiLineWidget, + name="Overview1", relx=OVERVIEW_WIDGET_REL_X, rely=OVERVIEW_WIDGET_REL_Y, max_height=OVERVIEW_WIDGET_HEIGHT, max_width=OVERVIEW_WIDGET_WIDTH ) - self.basic_stats.value = "" - self.basic_stats.entry_widget.editable = False + self.basic_stats2 = self.window.add(MultiLineWidget, + name="Overview2", + relx=OVERVIEW_WIDGET_REL_X+OVERVIEW_WIDGET_WIDTH, + rely=OVERVIEW_WIDGET_REL_Y, + max_height=OVERVIEW_WIDGET_HEIGHT, + max_width=OVERVIEW_WIDGET_WIDTH + ) + self.basic_stats1.value = "" + self.basic_stats2.value = "" + self.basic_stats1.entry_widget.editable = False + self.basic_stats2.entry_widget.editable = False ###### Memory Usage widget ######### @@ -649,7 +695,7 @@ def draw(self): PROCESSES_INFO_WIDGET_REL_X = LEFT_OFFSET PROCESSES_INFO_WIDGET_REL_Y = CPU_USAGE_WIDGET_REL_Y + CPU_USAGE_WIDGET_HEIGHT PROCESSES_INFO_WIDGET_HEIGHT = int(8*self.Y_SCALING_FACTOR) - PROCESSES_INFO_WIDGET_WIDTH = OVERVIEW_WIDGET_WIDTH + PROCESSES_INFO_WIDGET_WIDTH = OVERVIEW_WIDGET_WIDTH*2 self._logger.info("Trying to draw Processes information box, x1 {0} x2 {1} y1 {2} y2 {3}".format(PROCESSES_INFO_WIDGET_REL_X, PROCESSES_INFO_WIDGET_REL_X+PROCESSES_INFO_WIDGET_WIDTH, PROCESSES_INFO_WIDGET_REL_Y,