Non-integer output...

Although I like the fact we can now work with non-integers if we’d like (and round them if we don’t), IMHO the display of ‘[device_performance()]’ should be done with rounded figures.

I mean:

cpu: 4.3455% mem: 59.7972% virt: 20.0359% disk: 34.0763%

may be a bit too much info and makes the device boxes a bit wide. Who cares about tenths (of thousendths) of percentages in these matters? Rounded figures like:

cpu: 4% mem: 60% virt: 20% disk: 34%

are quite sufficient here, I think.

Oh yes, so this is a feature chance request :slight_smile:

I have been looking into this because it has caused a lot of issues with the layout of our maps. I appears at least for our install that this only happens when you upgrade. A fresh install does not. I did notice that the change log in version 11 says that there was a built in round function and wonder if there is an issue upgrading the data. I have tried too look at the SNMP txt files and look at the functions but I cannot find out what is different. I wanted to try to do a backup and a restore but for some reason that does not backup any of the maps just files and system settings. Any way just FYI.

Thanks for the feedback!

So you’re saying it is not possible to export the configuration (using the export toolbar button), create a clean Dude install, import the exported configuration and end up with a fully working Dude?

Is the import/export not a ‘complete’ backup?

Some feedback on the new beta 12:

CPU now shows no-decimal or single-decimal output on the device, the rest is still float/double. It’s now like this:

cpu: 14% mem: 59.7972% virt: 20.0359% disk: 34.0763%
or
cpu: 14.5% mem: 59.7972% virt: 20.0359% disk: 34.0763%

I’m not sure when it will display single decimals and when not. I have a feeling it rounds to the nearest integer or ‘half integer’ (x.5%). If so, I would prefer Dude to do a ‘proper’ rounding. Either fully use a single decimal, or don’t use one at all.

This is per design. In version 2.0beta11 we changed number output to show
decimal places, also added "round()’ function and changed some functions
sources to actually use it. But when you upgrade from any previous version
non built-in functions that are already present are not changed. So you have
three options:

  1. manually change the sources of functions to do rounding;
  2. remove all non built-in functions and restart dude server (then they are
    re-added with default values)
  3. reset configuration

Cool that worked for me, thanks. I love this program!

Excelent. Edited cpu_mem_disk to do the rounding (so the ‘source functions’ for mem, cpu, etc. can stay precise) and that works great. Thanks!

Hoewever, in the course of things I had to restore a backed up config. All seems fine, except when I double-click on something like functions, probes, services, etc. it will not open automatically anymore (by ‘splitting’ the right part of the interface). Only option is to use right-click and ‘Open Sepearatly’). Any idea on how to fix this?

it would be very helpful if you could either send us your backup file that
causes such behavior (support@mikrotik.com) or tell us steps to do to get
such behavior with fresh config.

I will supply you with my backup. First I have to do some some testing to see what happens in a ‘fresh’ installation though, haven’t tried that.

Question though: is freshly installing and importing a XML-backup FULLY functional? Does is include graph-history? Custom functions? Custom probes? etc.?

What I did to fix the problem was just delete all the functions I could. All the functions I deleted were recreated once the dude was restarted and all was well.

When I was playing around with backup I could not get the backup to restore any of my maps or devices. It may have been that I did not backup or restore properly as I was trying many things at once. I guess it will be simple enought to test though.

dude backup contains everything, including graph history, custom functions, files, everything. And everything should be available after import.

Freshly installed The dude on a server that’s never had the Dude before. Imported the xml-backup and now that Dude also has the problem of not opening items automatically anymore (by ‘splitting’ the right part of the interface). Only option is to use right-click and ‘Open Sepearatly’.

Uldis: you asked for the xml-backup file. Where do I send it?

as stated above you should send it to support@mikrotik.com