Commit 143f4e20 authored by Mario Hock's avatar Mario Hock

CPU bars: display softirq instead of iowait

parent ef7df864
......@@ -52,14 +52,14 @@ def _display_cpu_bar(y, x, cpu):
# Constants
CPU_BAR_COLORS = ( curses.color_pair(3) | curses.A_REVERSE, # user
curses.color_pair(4) | curses.A_REVERSE, # system
curses.color_pair(5) | curses.A_REVERSE, # iowait
curses.color_pair(5) | curses.A_REVERSE, # softirq
curses.color_pair(6) | curses.A_REVERSE, # other
curses.color_pair(3) ) # idle
# Calculate proportions
cpu_util = 100-cpu.idle
other = 100 - sum( (cpu.user, cpu.system, cpu.iowait, cpu.idle) )
proportions = [cpu.user, cpu.system, cpu.iowait, other, cpu.idle]
other = 100 - sum( (cpu.user, cpu.system, cpu.softirq, cpu.idle) )
proportions = [cpu.user, cpu.system, cpu.softirq, other, cpu.idle]
# Prepare text.
text = '{0:.2%}'.format((cpu_util)/100.0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment