Vdash preview for those playing with `safe vault run-baby-fleming -t`

vdash is a terminal based dashboard for monitoring Safe Vaults

I’ve not yet added a timeline but vdash is now at a stage where it might be useful for those playing with a local network.

Windows, Mac, Linux

AFAIK it works on Linux, possible Mac but you need to build as described for logtail-dash if you want to run on Windows.

Install from crates.io

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

cargo install vdash
vdash --help

That should work but I confess I haven’t tested it.

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.

NOTE: Vault Metrics and Timeline are not implemented yet and will remain blank.

For some reason it takes a while for the PUT and GET counts to show in the “Vault Status” window (top left). I’m not sure why this is and haven’t investigated yet, but they will show up eventually!

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

PS There’s a known bug where after some time vdash stops getting the updates to tell it the vault files have changed. I may have a fix for this but for now you can just restart vdash if this happens.

22 Likes

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

4 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