Show Full Statistics of gLiveView

Hey there,

in this thread I noticed a more detailed view of gLiveView.

At “BLOCK PRODUCTION” my gLiveView shows Leader, Adopted and Confirmed statistics, similar as in this picture I found in the thread mentioned above:

image

I would appreciate the full detail view, similar like in this screenshot:

Which variables in the gLiveView env file do I have to set so that this full detailed statistic appears? I’m not using cntools at the moment at the block machine. I use a seperate VM for calculating the leaderlogs with cncli. So perfect would be if I could refer to this seperate IP address in case cncli is required for showing the full details! :slight_smile:

Thanks everyone :slight_smile:

hmm, if I remember well try to adapt the following line from env

#BLOCKLOG_DIR="${CNODE_HOME}/guild-db/blocklog" # Override default directory used to store block data for core node

If still not working try also to adapt the line

#DB_DIR="${CNODE_HOME}/db"

In order to “fully unleash” the gLiveView.sh blocks section, you will also need to run the following services o the block producer:

  • cncli sync
  • cncli.sh validate
  • cncli.sh leaderlog (this can also be executed manually every epoch)
    You will also have to edit the env file in order to make all the services run correctly, but this is the idea.

Thank you for your answers!

I did following steps on a seperate VM:

  • Sync is running
  • Leaderlog created the blocklog.db
  • Validate confirmed the current blocks

Thereafter I transfered the blocklog.db to the blockproducer, started gLiveView. The additional statistic section appears now, however, the statistics in there are all showing 0.
As soon as I remove the blocklog.db, the statistics are correct again!

I specified both BLOCKLOG_DIR and DB_DIR in the env of gLiveView.

Does gLiveView itself need access to cncli?

EDIT: If it helps anyone else: I just checked the source code of gLiveView and noticed following line:

for status_type in $(sqlite3 “${BLOCKLOG_DB}” “SELECT status, COUNT(status) FROM blocklog WHERE epoch=${epochnum} GROUP BY status;” 2>/dev/null); do

I checked if sqlite3 was installed… Since it was missing I used:

sudo apt-get install sqlite3

Now it’s working perfectly :slight_smile:

Thanks everyone!

You have to configure the paths in the “env” file used by gLiveView.sh to make it work correctly. And gLiveView.sh should have access to cncli, you have an environment variable for the path to it.
I believe you need at least the following environment variables to be correct:
CNCLI
BLOCKLOG_DIR
POOL_ID_FILENAME
POOL_VRF_VK_FILENAME
POOL_VRF_SK_FILENAME
POOL_HOTKEY_VK_FILENAME
POOL_HOTKEY_SK_FILENAME
in order to be able to use cntools.sh for all the tasks required for the blocks display.

I am glad you were able to resolve it!

Thanks for your quick reply… If it is helpful for others who come accross this tpoic:

From all these variables…

CNCLI
BLOCKLOG_DIR
POOL_ID_FILENAME
POOL_VRF_VK_FILENAME
POOL_VRF_SK_FILENAME
POOL_HOTKEY_VK_FILENAME
POOL_HOTKEY_SK_FILENAME

… I only specified BLOCKLOG_DIR and have full statistics now :slight_smile:

I believe all of them have some default values. If you install in a custom path, it might not work unless you update them :slightly_smiling_face:

1 Like

You will need to set the rest as well for everything to work