I've lunched a Geth server with default maxpeers which is 100 regarding to original documents. Now, I need to know how many nodes are connecting to my node? Is there any command to find it in Geth console?
Asked
Active
Viewed 2,298 times
1
Mohammad Saberi
- 307
- 5
- 17
-
@Ismael, alberto's answer was enough for my question. I needed it regarding to my previous question that you had answered it at https://ethereum.stackexchange.com/questions/82947/can-we-improve-the-performance-of-geth-server-by-setting-maxpeers-to-0 – Mohammad Saberi May 03 '20 at 12:02
1 Answers
4
To check the numbers of peers connected you can use the following command with the Geth console:
> net.peerCount
11
And if you want to get more information about the connected peers, you can use the command:
> admin.peers
[{
caps: ["eth/61", "eth/62", "eth/63"],
id: "08a6b39263470c78d3e4f58e3c997cd2e7af623afce64656cfc56480babcea7a9138f3d09d7b9879344c2d2e457679e3655d4b56eaff5fd4fd7f147bdb045124",
name: "Geth/v1.5.0-unstable/linux/go1.5.1",
network: {
localAddress: "192.168.0.104:51068",
remoteAddress: "71.62.31.72:30303"
},
protocols: {
eth: {
difficulty: 17334052235346465000,
head: "5794b768dae6c6ee5366e6ca7662bdff2882576e09609bf778633e470e0e7852",
version: 63
}
}
}, /* ... */ {
For more information, check the documentation.
alberto
- 3,343
- 2
- 12
- 21