I am using conky-1.7.2 with linux-2.6.31-gentoo-r6 on my gentoo box.
Using ${diskio} without argument, it shows twice value of actual value. (See screenshot)
I think that counting total_reads/total_writes (in update_diskio, src/linux.c) is incorrect.
It seems to an entire disk(eg sda) value and each individual partition(eg sda1,sda2,...) value are added to total_reads/total_writes.
But already entire disk value is the sum of each partition.
As a result, I/O values are counted twice.
I am sorry for my lack of coding skill. Regards.
screenshot
Can you post the output of "cat /proc/diskstats"?
Also consider that diskio will report ALL disk read/writes, so if you have another disk (say sdb) this will get added to sda to get to the total.
screenshot 2
/proc/diskstats
I atached /proc/diskstats and new screenshot. There are two HDDs on my box.
Please see screenshot2, ${diskio} reports twice value of I/O.
Looks like the proc diskio interface changed for 2.6.31 and so the awful hack that was used to distinguish between a disk and its partitions doesn't work anymore.
I just commited a patch for this in the 1.8.0 branch. Before committing to master I would however like you to check it out.
Could you do that?
src/linux.c patch
patched Conky screenshot
Conky with patch from git tree.
Thanks to norsett for your suggestion.
I found a similar case at procps.
See https://bugzilla.redhat.com/show_bug.cgi?id=485243
I simply copied procps's patch to conky-1.7.2/src/linux.c.
And it seems to that works fine. (See screenshot-mypatch)
Also I saw patch on git. But probably it works incorrect for many devices (eg /dev/sr0).
See screenshot-gitpatch, sr0(SATA CD-ROM) I/O has not been counted.
>Also I saw patch on git. But probably it works incorrect for many devices (eg /dev/sr0).
Well, when we discussed the patch we considered this a feature, not a bug ...
Thanks, I uploaded your patch.
I applied your new patch (from git) to my conky-1.7.2 ,
Now I can continue happy Conkying with this patch ;)
I think this issue should be Closed/Fixed.
Thank you very much.