1

I would like to view Ethereum txpool. From geth command line page it seems like I can use geth monitor to get a view of the txpool metic. But there aren't many document on how to use the tool.

Does anyone know a good example of using geth monitor?

0

Actually, the geth documentation describes pretty well how to use the tool geth monitor. Essentially, to do so you need to start a geth instance with both the --metrics flag and the support for the debug api.

An example for a local ethereum network:

geth \
    --rpc \
    --rpcport 8545 \
    --rpcaddr 127.0.0.1 \
    --rpccorsdomain 127.0.0.1 \
    --rpcapi "eth,web3,miner,net,admin,personal,debug" \
    --metrics \
    --bootnodes <your-bootnodes>

So now you can check that it shows correctly the metrics:

geth attach http://127.0.0.1:8545 --exec "debug.metrics(false)"

And in particular for the txpool metrics:

 geth attach http://127.0.0.1:8545 --exec "debug.metrics(false).txpool"

Now you can try to follow the documentation to show the real time graphics for the txpool:

 geth monitor --attach=http://127.0.0.1:8545 txpool

N.B. As reported in the question Geth monitor graphics character encoding, you may have some problems with the encoding.

0

Have you had any success with this?
I believe the node you wish to gather statistics from has to have --metrics set at startup? I have got to the stage of having graph axis displayed, but no data...

  • Can I ask you what type of character encoding do you use to show the axes? Or what type of shell? – Briomkez May 26 '18 at 9:31
  • 1
    Briomkez << Huge respect, got it working..! Happy Unicorn :) – EthBytes Jun 20 '18 at 6:37
  • SSH to Ubuntu 16.10, usual vanilla BASH shell. My command: ../bin/geth_1811 monitor --attach=192.168.1.100:8547 txpool This gives ten "windows" all monitoring various aspects: pending, queued etc. Make sure you run first "collecting" instance of Geth with the apis:eth,web3,miner,net,admin,personal,debug < what I messed up on... Hth – EthBytes Jun 20 '18 at 6:50
  • BTW: Some metrics to play with: system/disk/readcount/MeanRate system/disk/readcount/Overall system/disk/readdata/Overall system/disk/writecount/Overall system/memory/allocs/Overall system/memory/frees/Overall system/memory/inuse/Overall – EthBytes Jun 20 '18 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.