Function to Print Voting Deadline and Superblock time


Active Member
Masternode Owner/Operator
Feb 19, 2017
Dash Address
This guide will show you how to add a function to your shell that will print the time to the voting deadline for treasury funds and the time til the creation of the next Superblock.


You need a running dashd that is synced to the blockchain. You also need dash-cli in your PATH environment variable. Check this with which dash-cli, if this returns an error find the location of your dash-cli and add it to your PATH variable in the file ~/.profile. You also need the command bc this is a simple text calculator. Check for it with which bc if that gives you an error install it with sudo apt install bc

Getting Superblock

Follow the below steps to get and test run the function.
cd /tmp/
git clone
cd superblock
chmod a+x
Example output.



If the above worked and you got an output similar to mine, great, proceed with the below to make the function run whenever you login or whenever you invoke it directly with the superblock command

head -n -2 |tail -n +3 >> ~/.bashrc
echo -e "\nsuperblock\n" >> ~/.profile
Now we test it again first try via SSH, type in the below and enter your password to ssh to the machine and login again.
ssh localhost

See the message appearing on my terminal there?

Now let's try via the sudo command. Replace dash with your username.

sudo su - dash

In this case, you only see the superblock message, this is because when you su it does not process the motd scripts.

That's it, you're done! Leave me a comment if you like this guide or have an questions, you can also find me on Discord (xkcd#7307) if you wish to chat in realtime.
  • Like
Reactions: colofi and UdjinM6