multiload-ng icon indicating copy to clipboard operation
multiload-ng copied to clipboard

Disk graph doesn't show usage for LVM, LUKS, etc (patch available)

Open loftyhauser opened this issue 8 years ago • 11 comments

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 avatar Nov 18 '17 01:11 loftyhauser

@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.

ndorf avatar Sep 27 '18 21:09 ndorf

On my fork here https://github.com/loftyhauser/multiload-ng.

loftyhauser avatar Sep 27 '18 23:09 loftyhauser

Thanks! It works great for me.

ndorf avatar Sep 28 '18 05:09 ndorf

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?

ndorf avatar Sep 29 '18 20:09 ndorf

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!

ndorf avatar Sep 29 '18 22:09 ndorf

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).

loftyhauser avatar Sep 29 '18 23:09 loftyhauser

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 avatar Dec 23 '19 13:12 haarp

@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

ndorf avatar Feb 18 '20 17:02 ndorf

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 avatar Feb 19 '20 09:02 haarp

@haarp d'oh, you might want to try nylen's fork at https://github.com/nylen/multiload-ng

ndorf avatar Feb 20 '20 20:02 ndorf

@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!

haarp avatar Feb 21 '20 07:02 haarp