Open madhur opened 1 year ago
@marius @alip @madhur I want to work on this issue , Please assign me . Thanks.
@marius @alip @madhur I want to work on this issue , Please assign me . Thanks.
I assume you can just fix and raise PR. There is no assignment needed.
Fwiw, seeing the same behavior with total_run_times = 0.
OS: Arch linux.
Conky version report:
conky 1.18.1_pre compiled 2023-09-03 for Linux x86_64
The math requires 2 data points to calculate the usage, so you can't have a result with just 1 sample (which is what total_run_times = 1
will do).
The math happens here on Linux: https://github.com/brndnmtthws/conky/blob/53973402b4fda399267c225b9fc7395ed862bde9/src/linux.cc#L1055-L1073
I don't think that explains the entire issue.
As mentioned earlier in the thread, my .conkyrc explicitly sets total_run_times
to 0, yet the top CPU usage is often (though not always) reported as "0.00". Example annotated screenshot attached.
Ah, I think I misunderstood. It doesn't make sense that the top value would be zero in this case, so it probably warrants further investigation.
@epsheldoni confirms the same issue on OpenBSD. Still present in at least 1.9.0, but likely in latest version too.
I notice that I have total_run_times 0 in my .conkyrc. After I change total_run_times to 1 or greater, conky crashes Here is what I get
pangolin$ conky -d Conky: forked to background, pid is 98789 pangolin$ Conky: desktop window (1a00003) is subwindow of root window (538) Conky: window type - normal Conky: drawing to created window (0x2000002) Conky: drawing to double buffer
and nothing is displayed. So, I try to kill the process and I get
pangolin$ kill 98789 ksh: kill: 98789: No such process pangolin$
After I change total_run_times back to zero and relaunch conky, I did notice that initially the ${cpu cpu1}% values show something other than zero briefly and then change to zero.
What happened?
The CPU percentages are always zero. Even if I run stress occupying 6 cpu's 100% of my 12 cpu processor.
I understand its because of
total_run_times
being 1. Here is the outputIf I make the
total_run_times
as 2The output is correct. I understand its calculating CPU usage of processor across all CPU. Thus 100/12 ~ 8.33 %
Version
conky 1.17.1_pre compiled 2023-01-21 for Linux x86_64
Which OS/distro are you seeing the problem on?
Linux (other)
Conky config