Vdash - Node dashboard for Safe Network

This is just setting environment variables, so you should be able to do that manually before you run the main command. I can’t remember the syntax but it is something like:

set RUST_LOG “debug,quinn=error”

And you can see if that worked with something like:

echo %RUST_LOG%

Once you have RUST_LOG set, you can just run the vault command and it will pick that setting up. If you discover the exact incantation I’ll add it to the README.

1 Like

Update v0.2.4 has the essentials in place to be a useful vault/node monitor, so I’ve made a short screen recording below. It shows some PUTS and GETS if you watch for a minute or so. The animation just shows one vault/node, but you can cycle between several, and the timelines can be zoomed out from 1 second per column to 1 minute, day, hour etc if you’ve kept your logfiles for long enough!

I have ideas for improving on this, but don’t think I’ll do much more until Maidsafe’s code is settled and I know if this approach will be supported by the new logfiles (at the moment they don’t have the info I need for this, so that requires a little collaboration). They may of course have other priorities :grin: and/or may wish to go a different way. I raised an issue to track this and will add a little more to it: sn_node issue #1126

Anyway, here’s a short animation showing vdash in action. Here I’m just showing the activity of one vault using the ‘run-baby-fleming’ and doing some puts and gets using the safe CLI:


We do need to and will get the logs more structured here. Your input will be really useful, probably lead our message format actually. I would love to see a few projects using the logs like this so we can be sure of good log interface, but this itself will be a huge help.

@lionel.faber worth a watch as you are on logs alongside everything else right now.


I’ll be happy to help so if @lionel.faber and anyone else from Maidsafe would like to suggest how I can contribute, please do. In the mean time I’ll make some small additions to issue #1126 based on what I learned today.


This seems to work in that I can see the vdash output now, but echo %RUST_LOG% doesn’t do anything but output the string “%RUST_LOG%”, which isn’t terribly helpful!.

Another thing that’s not possible on Windows is vdash C:/.../.safe/vault/baby-fleming-vaults/*/safe_vault.log because there’s no wildcard option possible for directories in a Windows URL. I expect there’s a way to do this but all that I’ve found so far look complicated.

Could vdash take a folder as input rather than individual files? If so an easy way would be to create a folder full of symlinks. (Then again, it doesn’t like the .lnk extension that Windows puts on shortcuts)

It will open a link called safe_vault2 but if you use * it sees it as safe_vault2.lnk.


This is all exceptionally helpful John!

Sorry I seem to have mislead you on how to set and print Windows environment variables, but maybe another Windows user can help us with this.

An alternative, for now at least, is to specify each logfile in full. That’s a long line to type but it can be put in a batch file. I do this in Linux myself because it’s useful when starting from scratch to delete all those logfiles, start vdash, and then start the vaults.

This works because the logfiles don’t need to exist when you start vdash - it will still pick them up as soon as the vaults create them.

1 Like

Looks like it should be:
set var=value

You can also use set to read the value:
set var


Yes! :+1: That works in cmd, but not in Powershell which is what I was using! Windows CLI is not much fun… Echo works too. I’ll stick to cmd in the future

1 Like

In powershell the env variables are set using:


Thanks for the great work on this @happybeing. This looks awesome :slight_smile:
I’ve responded to the issue on GitHub.


I have given this a mac whirl @happybeing, and seemed to be working fine! top stuff :tada:


Thanks @lionel.faber and @joshuef great news and great help. I’ll update the README and follow up on the issue.


I’ve updated the build configuration you should no longer need the --features="crossterm", so have left this out of the README. No need to retest, just letting you know.


I was looking into vdash for some local test net visualisation. I’ve made a wee PR for some name changes: Vault->Node by joshuef · Pull Request #3 · happybeing/vdash · GitHub which gets us a bit further w/r/t recent changes, but not wholly there as yet (at least on my machine).


Thanks Josh, will take a look!


I’ve published vdash v0.5.0 which has been updated to work with the latest sn_node release (v0.25.15) as in Safe Network Dev Update - December 17, 2020. It’s a quick first go, so not necessary counting GETS/PUTS precisely but does provide a useful indication and animated display.

Note: you will need Rust installed, details in the README but very easy on Linux (cargo install vdash) A bit more tricky on Windows, but it has been done before!

Thanks to Josh for doing a lot of renaming “vault” to “node” and Gabriel for helping get the GET/PUT stuff tested.


Replying to @Joshuef here: Safe Network Dev Update - December 17, 2020 - #124 by joshuef

I’m not focussed on vdash now but would like to maintain what I have while making it as accurate as possible. I’m doing simple string matching, so not too bothered about the format of the last part (the message) of each entry.

If you can generate or point me to log messages that I can use to detect the following in a single message they would be easy for me to incorporate:

  • number of Infants/Adults/Elders per section (and any similar stats). I no longer have this working as the logs no longer seem to provide this information.

I have something for counting PUTS and GETS but think I’m counting GETS incorrectly at the moment, and not sure if the logs have this in a convenient form:

  • a single GET of any data type (which may result in a reward for this node)
  • a single PUT of any data type (that may later reward a GET for this node)

Currently I’m using the following messages to identify a single PUT or GET, but don’t know if they are ‘accurate’ (i.e. one message for each event).

[sn_node] INFO 2020-12-18T14:34:23.250257713+00:00 [src/chunk_store/mod.rs:134] Writing chunk succeeded!

GET (matching the " response: QueryResponse::Get" to cover multiple data types):
[sn_node] INFO 2020-12-19T18:09:39.968758995+00:00 [src/node/mod.rs:223] Running as Node: SendToSection [ msg: MsgEnvelope { message: QueryResponse { response: QueryResponse::GetSequence(Success), id: MessageId(f43e31..), correlation_id: MessageId(7a42ea..), query_origin: Client(157bd5..) }, origin: MsgSender { entity: Entity::TransientElderKey::Ed25519(2fa316..)BlsShare(97be30..)ElderNode(Metadata), sig: Some(EntitySignature::Elder::BlsShare(..)) }, proxies: [] } ]

For node agebracket I’m looking for either of the following and picking Infant, Adult or Elder off the end of the message:
[sn_node] INFO 2020-12-18T14:33:49.799524575+00:00 [src/node/mod.rs:104] We are Infant
[sn_node] INFO 2020-12-19T17:50:07.785869066+00:00 [src/node/node_duties/network_events.rs:44] Node promoted to Elder

All the above are ‘working’ but I may not be counting GETS and PUTS accurately. Note that Gabriel suggested using a different message for GET (but with additional filtering by chunk ID) but I didn’t find this particular message in my logs. I found other variants of it, so I think it would be quite tricky to base stats on it:

[sn_node] INFO 2020-12-19T15:11:11.871542122-03:00 [src/node/mod.rs:205] Running as Adult: RunAsChunkStore(ReadChunk(MsgEnvelope { message: Query { query: Data(Public(bbe703..)), id: MessageId(f10c88..) }....


Hey @happybeing! :slight_smile:

With this PR, we’ve improved the logging a wee bit. Therefore now:

  • Every successful PUT will be notified by:
    [sn_node] INFO 2020-12-21T14:35:22.747109144+05:30 [src/node/elder_duties/data_section/metadata/writing.rs:64] Wrote data from message 'MessageId(7fbee3..)' successfully!

  • Every successful GET will be notified by:
    [sn_node] INFO 2020-12-21T14:35:21.898181789+05:30 [src/node/elder_duties/data_section/metadata/reading.rs:46] Read data queried by message 'MessageId(6ef845..)' successfully!

As for the Age bracket, you can stick to the same for now, but we expect things to change minorly there so we’ll make that clearer in the upcoming PRs.

Hope that helps (:


Thanks @Yogesh I’ll merge as soon as I can - busy today so may be tomorrow.


@yogesh Sorry not to spot this earlier, but would it be possible to not split the sentences with ‘MessageId(xyz…)’ and have that at the end?

So, if for example the log was:
[sn_node] INFO 2020-12-21T14:35:21.898181789+05:30 [src/node/elder_duties/data_section/metadata/reading.rs:46] Read data queried by message successfully. 'MessageId(6ef845..)'

I could match on “Wrote data from message successfully.”

Or if the “successfully” is superfluous I can just match on “Read data from message” and “Wrote data from message”. I’ll do that for now anyway.

FYI: I’ve published vdash v0.5.1 which matches on the first part of each string (before the “MessageId”) so you can test this if you like. cc @joshuef