mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
#207 CPU unscaled column changes color according to system total usage
If container uses two cores then CPU column will be always red even if we have dozens of other free cores and CPUS is 1%
This commit is contained in:
@@ -24,10 +24,10 @@ func NewCpuScaledCol() CompactCol {
|
||||
|
||||
func (w *CPUCol) SetMetrics(m models.Metrics) {
|
||||
val := m.CPUUtil
|
||||
w.BarColor = colorScale(val)
|
||||
if !w.scaleCpu {
|
||||
val = val * int(m.NCpus)
|
||||
}
|
||||
w.BarColor = colorScale(val)
|
||||
w.Label = fmt.Sprintf("%d%%", val)
|
||||
|
||||
if val > 100 {
|
||||
|
||||
Reference in New Issue
Block a user