Disk graph doesn't show usage for LVM, LUKS, etc (patch available)
The disk graph doesn't show any disk usage for partitions that are not directly mounted, and so it doesn't show usage for partitions that are used by LVM or LUKS, for example. When getting the data, instead of looping through the mounted partitions, perhaps you can simply loop through the block devices as you do to populate the filter. I've implemented the change and have a patch to contribute (as soon as I figure out how to use GitHub!).
@loftyhauser do you still have the patch handy? I'd be happy to help you get it on github if you'd like.
I'm having the same problem -- only the /boot partition can be monitored. I was hoping that monitoring entire drives, rather than partitions, would work, but no such luck.
On my fork here https://github.com/loftyhauser/multiload-ng.
Thanks! It works great for me.
Hmm, I spoke too soon. With this patch, my MATE multiload applet crashes like clockwork every 15 minutes. The crash is always in the same place, which is in the CPU usage monitor and therefore unrelated to the actually modified code:
#3 0x00007f9ea5af763a in g_assertion_message_expr () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00005576a50bf079 in info_file_required_fopen (path=path@entry=0x5576a50d075c "/proc/stat", mode=mode@entry=0x5576a50c7a3d "r") at info-file.c:31
#5 0x00005576a50bb78e in multiload_graph_cpu_get_data (Maximum=18, data=0x5576a6465fc0, g=<optimized out>, xd=0x5576a6381400, first_call=0) at graph-cpu.c:88
#6 0x00005576a50c0448 in load_graph_update (g=0x5576a64beed0) at load-graph.c:225
/proc/stat is always readable, so I wonder if the patch is leaking file descriptors?
Yep, that was it. You also forgot to free the buffer, leading to a memory leak. Both are fixed here. (edit: fixed broken link)
Thanks again for this patch!
Ah, glad you caught the error! I noticed that the applet crashed regularly, but since XFCE automatically restarted the app, it didn't make much difference (it was annoying though).
My NVMe disk is also not showing up in multiload-ng even with your patches applied. It's devpath is /dev/nvme0n1 or /dev/nvme0n1pX for partition X. I suspect they are being ignored in graph-disk.c but I can't tell for sure. Any ideas @loftyhauser @ndorf ?
Thanks!
@haarp I don't know for sure as I don't have any NVMe drives, but this might be the fix: https://github.com/udda/multiload-ng/pull/63
Thanks @ndorf that is indeed the fix for NVMe drives. However it doesn't seem to be compatible with the patchset here. I guess I'll stick with the NVME patches for now.
@haarp d'oh, you might want to try nylen's fork at https://github.com/nylen/multiload-ng
@haarp d'oh, you might want to try nylen's fork at https://github.com/nylen/multiload-ng
Nice, that fork has everything I need, thanks!