Long Mount points disrupt server information

Just to make it more obvious what is occurring with the server info I have done a couple of screen shots below.

What we’re used to seeing is something like this (from @borpin’s server info in the linked thread)

However @sjthespian’s system seems to have several more drives or mount points listed and whilst the count doesn’t effect the formatting, the fact that one of those mount points has a rather long name and path, it is forcing the second table column to be significantly wider.

In fact it caused a horizontal scroll bar to be added and the 3rd column can only be seen by scrolling horizontally

Since we do not have any control over what users may call their files/folders nor what depth the paths may go, I think there needs to be a limit set to only show the first ~30 chars and ellipsis when the path/name string is any longer perhaps.

I saw that and scrolled but my poor brain did not process what it then saw properly.

That could be tricky. I’ll have a look.

1 Like

Just to be clear, I wasn’t asking or expecting you to do it, I was just expressing an opinion. I might have thought about opening a issue so it doesn’t disappear off into the depths of the forum, but I’ll hold off if you are taking a look.

No that’s fine. Having fixed the formatting I’m sort of familiar with what it does and actually it is quite simple (famous last words).

1 Like

@pb66 I think I have a solution, I just need a long mount point to test it.

Can you suggest how I might create a long mount point?

Do you have a usb stick you can plug in and temporarily mount it with something like

sudo mkdir /media/$longname
sudo mount /dev/sda1  /media/$longname

or close to that effect

No not really as it is in a VM.

If the VM has no access to external devices then no, that won’t work.

Can you retrospactively add another partition? (and remove it later?) alternatively, if this is a test VM, I believe you can re-mount mountpoints multiple times to different mountpoints, but I do not know how that might play out in a VM. Do you have a sepearte data partition you could also mount as /media/$longname?

Otherwise, how bigga edit is it? could @sjthespian try it out if you ask him nicely?

Which VM, Brian?

It is an Esxi Host running a DietPi VM.

I have created a PR Limit size of Mount point text by borpin · Pull Request #1203 · emoncms/emoncms · GitHub. Need a long mount point to test it on.

Hmm, haven’t heard of that one. Oh well…

It is the VMWare bare metal hypervisor that I installed years ago on an HP Micro Server. A relatively old version 5.5 but it just works :smile:.

Or if you can reboot, you could add the following to fstab (like how we add /var/log to tmpfs on the RO emonSD images and the data partitions)

tmpfs           /somereallylongstringofcharacterstotestmycorrectionstotheformattingoftheserverinfofromemoncms    tmpfs   nodev,nosuid,size=1M,mode=1777 0  0

[edit] having said that . . . Where is your ramlog in your server info? Does tmpfs show as a valid mountpoint normally on an emonpi? I know DeitPi is different to the emonPi’s logfile location.

The admin view uses df --block-size=1 to fill the list of mount points which, for me, returns;

Filesystem      1B-blocks       Used  Available Use% Mounted on
udev            246919168          0  246919168   0% /dev
tmpfs            51646464    8929280   42717184  18% /run
/dev/sda1      8385912832 3336208384 4947050496  41% /
tmpfs           258211840          0  258211840   0% /dev/shm
tmpfs             5242880          0    5242880   0% /run/lock
tmpfs           258211840          0  258211840   0% /sys/fs/cgroup
tmpfs          1072693248          0 1072693248   0% /tmp
tmpfs            52428800    3571712   48857088   7% /var/log
tmpfs            10485760    1572864    8912896  15% /DietPi

The admin view code, filters out anything on udev or tempfs hence the admin view only shows / for me.

If it aint broke, don’t fix it.
Sounds like it’s rock solid. :wink:

1 Like