Vdash Safe Node dashboard - works with Fleming testnets or local networks

vdash is a terminal based dashboard for monitoring Safe Node (Vaults) on Windows, MacOS and Linux.

Now with live updating timelines for one or more vaults.

Keyboard commands:
Left/Right arrow: cycle between nodes (vaults)
’i’ or ‘o’: zoom timeline in or out (’+’ or ‘-’ also work)
’q’: quit

Update: vdash v0.3.0

Install from crates.io

See the README for more, but assuming you have Rust installed:

cargo install vdash
vdash --help

If you are on Windows you need to clone the repo and build manually, as described in step 2c.

vdash can only be used with a baby-fleming local test network at this point, but will be updated for the new test networks when they emerge.

Use with a local test network

Example:

safe vault killall
rm -f ~/.safe/vault/baby-fleming-vaults/*/safe_vault.log
RUST_LOG=debug,quinn=error safe vault run-baby-fleming -t

Note:

  • you need to make sure no existing vaults are still running, and deleting existing logfiles prevents you picking up statistics from previous activity.
  • setting RUST_LOG ensures the logfiles contain the data which vdash needs, and excludes some that gets in the way.

Then:

vdash ~/.safe/vault/baby-fleming-vaults/*/safe_vault.log

For more info see the README which walks you through everything.

With vdash you’ll see the vault logfiles growing (like using tail -f) and can scroll up and down using the arrow keys. The display only shows one vault at a time, but if you passed multiple logfiles to vdash you can cycle through them using TAB or the left/right arrow keys.

You’ll see the vault ages move fairly rapidly from Infant to Elder, and if you store some files with the Safe CLI (e.g. safe files put -r <directory>) eventually the PUTs will show up too. Same for gets using safe cat and so on.

Let me know if you have a go and how you get on.

PS There’s was a bug where after some time vdash stops getting the updates to tell it the vault files have changed. I have attempted to fix this but am not sure it has solved the problem, so please let me know if it happens to you. You can just restart vdash if this happens.

27 Likes

THank you for this Mark, I just wish I had time right now to get tore into this properly

5 Likes

Nice clear instructions in the README - I reckon even an idiot could get it working (famous last words). This one will have a go over the weekend.

2 Likes

Works well on Linux (Mint) :clap:t2:, with the delays noted in the OP (wonder why that is? Feels like it needs to be polling continuously but isn’t).

Two suggestions - make the name of the vault in Vault Status match the actual name of the vault being logged rather than just counting up from 1 - eg safe-vault-2 rather than vault 1. Also, it would be helpful if you could toggle word wrapping on and off in the Vault Log window.

Can’t build it in Windows though - have raised an issue on Github.

Look forward to future developments. Always happy to test stuff out with my limited abilities as you know, time permitting.

3 Likes

Looking forward to trying this tomorrow!

2 Likes

Excellent John, and thanks for the feedback and for raising issues.

I am about to push a simple timeline for PUTS and GETS, but that also needs quite a bit more work due to limitations of the graphics library. I’ll also need to provide multiple timescales.

There are lots of things I need to work on and the speed of processing is a priority because we now have some data to display but it is being updated far too slowly and is minutes behind real time even on a beefy processor.

I’ll bear your suggestions in mind, maybe when features are more complete I’ll be looking again at usability. Line wrap on the logfile window is possible but a biggish change so don’t expect that for a while.

So feel free to open issues for feature requests and UI enhancements too.

UPDATE: I’ve published a new version with a simple timeline for PUTS and GETS. Very crude work in progress, and not much use until I speed things up, but gives an idea of when this will be like.

2 Likes

I’ve no idea how you’re approaching this but wonder that an intermediate step that draws out the data and then the tail is a diff, might be faster than ever looking to read the whole of a large log file many times over. That said, I don’t know how you track the change… perhaps by line number if the log is not truncating itself.

Thanks @davidpbrown, the issue is within my processing, not accessing the files (which is handled by linemux). You can see this if you use logtail to monitor the files, it has no problem keeping up. Hopefully it won’t be hard to sort.

1 Like

All of my vault logs are static on Vdash, apart from one, Safe-Vault-2 which is updating about 10x a second. Why would that be I wonder?

Looks like you neglected to set the log level when starting your vaults:

And if you do cargo install vdash again (assuming that does what I expect it does) you will get a timeline!

1 Like

Hmm - pretty sure I did that. Let me try again.

1 Like

Make sure you do safe vault killall and then manually delete all the existing logfiles first or you will still have a lot of guff in them. I should add that to the instructions, sorry! Done :grinning:

2 Likes

Yes working now. Maybe I did things in the wrong order. Loving the nostalgic graphics!

3 Likes

Great stuff John. I see you still have quinn filling up your logfile though so the RUST_LOG setting isn’t doing it’s job and it may cause problems. But at least you have seen the timeline working.

1 Like

This sir is sexy.

2 Likes

Update: vdash is now at v0.2.2 v0.2.0 to mark it becoming a bit useful. See the OP for latest screenshot) including timelines for PUTS, GETS and ERRORS.

i (zoom in) / o (zoom out) - zoom Timeline in or out. The +/i keys also zoom in/out over the following ranges: 1 second/minute/hour/day/week/year per column
left/right arrow - move to next/previous vault status
q - quit

8 Likes

Latest update has a few enhancements, tweaks and bugfixes.

Instructions to install on Linux/MacOS using cargo install, and for building on Windows can be found here.

If anyone if you have time to try a build on Windows, that would be cool. @JPL?

AFAIK nobody has tried this on MacOS yet, so if there are any brave Mac users out there, let me know what happens if you try it.

5 Likes

Success! Had to add a flag --features="crossterm" though so

cargo +nightly build -Z features=itarget --bin vdash-crossterm --release --no-default-features --features="crossterm"

1 Like

Thanks very much John. I’ll update the README.

1 Like

I’ve never had any success getting RUST_LOG=debug,quinn=error working on Windows. Probably a matter of them not being in the path but I’ve no idea where they live.