How to check peer connectivity in ethereum private network?

0 votes
I created two peers with 5 accounts each. I connected the two peers using bootnode. Then I created 3 more peers and connected them to the same peer. Now, I want to check how many peers are connected to the main peer. How can I check this status? Peer details are not necessary, only number of peers is what I want.
Jan 10 in Blockchain by slayer
• 29,040 points
12 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can use the net module to check the peer connectivity details. There are two options:

1. To check if the current node is listening:

> net.listening

Returns true if it is listening and returns false if not.

2. To check if the number of peer connected:

> net.peerCount
answered Jan 10 by Omkar
• 65,850 points

Related Questions In Blockchain

0 votes
1 answer

How to import an account in private ethereum network?

 When you create a new account, the ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 65,850 points
11 views
0 votes
1 answer

How to change default account in private ethereum network?

First list the accounts: > eth.accounts NOTE: Even ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 65,850 points
24 views
0 votes
1 answer

How to connect two different nodes in private ethereum network?

To connect two nodes, you can use ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 65,850 points
56 views
0 votes
1 answer

How to get Node URL in private ethereum network?

You have already noticed that  admin.peers does ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 65,850 points
11 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
63 views
0 votes
1 answer
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 114 views
0 votes
1 answer

How to get IP address of peer connected in private ethereum network?

To get these details, you can use ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 65,850 points
18 views
0 votes
1 answer

How to get account with ethers by default in ethereum private network?

Have you created an account before allocating ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 65,850 points
20 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.