mirror of https://github.com/aristocratos/bashtop
Fixed: Expanded graph history for hires graphs
parent
226cf89a3d
commit
102e015c2c
8
bashtop
8
bashtop
|
@ -1943,8 +1943,8 @@ EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
#* Copy cpu usage for cpu package and cores to cpu history arrays and trim earlier entries
|
#* Copy cpu usage for cpu package and cores to cpu history arrays and trim earlier entries
|
||||||
if ((${#cpu_history[@]}>tty_width*2)); then
|
if ((${#cpu_history[@]}>tty_width*4)); then
|
||||||
cpu_history=( "${cpu_history[@]:$tty_width}" "${cpu_usage[0]}")
|
cpu_history=( "${cpu_history[@]:$((tty_width*2))}" "${cpu_usage[0]}")
|
||||||
else
|
else
|
||||||
cpu_history+=("${cpu_usage[0]}")
|
cpu_history+=("${cpu_usage[0]}")
|
||||||
fi
|
fi
|
||||||
|
@ -2821,8 +2821,8 @@ collect_net() { #? Collect information from "/proc/net/dev"
|
||||||
|
|
||||||
#* Copy download and upload speed to history arrays and trim earlier entries
|
#* Copy download and upload speed to history arrays and trim earlier entries
|
||||||
local -n history="net_history_${direction}"
|
local -n history="net_history_${direction}"
|
||||||
if ((${#history[@]}>box[net_width]*2)); then
|
if ((${#history[@]}>box[net_width]*4)); then
|
||||||
history=( "${history[@]:${box[net_width]}}" "${net[speed_${direction}]}")
|
history=( "${history[@]:$((box[net_width]*2))}" "${net[speed_${direction}]}")
|
||||||
else
|
else
|
||||||
history+=("${net[speed_${direction}]}")
|
history+=("${net[speed_${direction}]}")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue