You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-56Lines changed: 47 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,24 +3,28 @@
3
3
> EthStats - Network Monitor - CLI Client
4
4
>
5
5
>
6
-
> The client application connects to your Ethereum node through RPC and extract data that will be sent to the `EthStats - Network Monitor - Server` for analytics purposes.
6
+
> The application connects to your Ethereum node through RPC and extract data that will be sent to the `EthStats - Network Monitor - Server` for analytics purposes.
7
7
8
8
# Live deployments
9
9
See active nodes or add your own on the following running deployments of the EthStats Network Monitor
@@ -37,18 +41,6 @@ Please make sure you have the following installed and running properly
37
41
-[Geth](https://geth.ethereum.org/install/) or [Parity](https://wiki.parity.io/Setup) running in one of the supported configurations **synced on the Ethereum main/foundation chain**
38
42
- JSON-RPC http or websockets or ipc APIs enabled and accessible on the Ethereum node of choice (Geth/Parity)
@@ -81,25 +73,42 @@ yarn global upgrade ethstats-cli
81
73
```
82
74
83
75
## Running
84
-
On the first run the app will start in interactive mode and you will be asked a series of questions to setup your node.
85
-
Either follow the on screen instructions or see [CLI options](#cli-options) for a non-interactive mode.
86
-
87
-
The app is configured by default to connect to an Ethereum node on the local machine (http://localhost:8545).
88
-
To connect to a node running on another host see `--client-url` under [CLI options](#cli-options).
89
-
90
-
After the setup is done, your node will be visible on [net.ethstats.io](https://net.ethstats.io/)
76
+
To run the app use the following command:
77
+
```sh
78
+
$ ethstats-cli
79
+
```
80
+
The app is configured by default to connect to the Ethereum node on your local host (http://localhost:8545).
81
+
To connect to a node running on a different host see `--client-url` under [CLI Options](#cli-options).
91
82
92
83
IMPORTANT: To be able to extract all statistics from the Ethereum node we recommend running the app on the same host. The usage information about the node like cpu and memory load cannot be extracted if on a different host.
93
84
94
-
### CLI
85
+
##Register node
95
86
96
-
To run the app in interactive mode you can use the following command:
87
+
On the first run of the app the first thing it does is to register the Ethereum node in our platform. For this you will be asked about the network the node is running on, email address and node name.
97
88
89
+
It is possible to register the node also in non interactive mode without asking the necessary infos by specifying the `--register` option like in the example bellow:
For more details on these options please see [CLI Options](#cli-options).
95
+
96
+
If the node is already registered and you still specify the `--register` option, it will be avoided. A new registration is possible if the [config file](#config-file) is deleted.
97
+
98
+
## Config file
99
+
After the node was successfully registered, a config file is created in the following location:
100
+
```sh
101
+
~/.config/configstore/ethstats-cli.json
102
+
```
103
+
104
+
It persists the node name, the secret key received on successfully registration and the values of the following CLI options:
105
+
-`--configurator-url`
106
+
-`--server-url`
107
+
-`--client-url`
108
+
-`--client-ipc-path`
109
+
-`--network`
110
+
111
+
# CLI Options:
103
112
104
113
```sh
105
114
--help, -h Show help
@@ -109,6 +118,7 @@ $ ethstats-cli
109
118
110
119
--server-url Server URL (Must include protocol and port if any)
111
120
--net, -n Specify Ethereum network your node is running on (Default: mainnet)
121
+
Available networks: mainnet|goerli
112
122
If --server-url is specified, this option is ignored
113
123
114
124
--client-url Client URL (Must include protocol and port if any; Default: http://localhost:8545)
@@ -124,28 +134,15 @@ $ ethstats-cli
124
134
--node-name Name of the node. If node is already registered, a unique 5 char hash will be appended
125
135
```
126
136
127
-
Running the app in non-interactive mode for the first time, you'll need to specify the `--register` option together with `--account-email` and `--node-name`.
128
-
Like this no questions will be asked. All other CLI options have default values.
If the app is already registered and you still specify the registration CLI option like in the example command above, they will be avoided.
136
-
137
-
If the node was successfully registered, a configuration file is created to persist the values of the CLI options previously specified.
138
-
Every CLI option that passes a value, once specified, it's value is stored in this configuration file, so the next time the app is started there's no need to specify does CLI options again.
139
-
140
-
### Daemon
137
+
# Daemon
141
138
142
139
To keep the app running at all times, you can run it as a daemon using the following command:
143
140
144
141
```sh
145
142
$ ethstats-daemon
146
143
```
147
144
148
-
#### Daemon options:
145
+
## Daemon options:
149
146
150
147
```sh
151
148
start Start daemon
@@ -158,7 +155,7 @@ $ ethstats-daemon
158
155
If any CLI options are specified after the Daemon option, they will be forwarded to the forked process.
159
156
The Daemon mode is implemented programmatically through the PM2 API. The API does not support the "startup" feature. To handle start on boot, check out the [PM2](#with-pm2) instructions.
160
157
161
-
### With PM2
158
+
## PM2
162
159
163
160
For more control you can use directly [PM2](http://pm2.keymetrics.io). Here is a JSON format process file that we recommend:
164
161
@@ -178,9 +175,9 @@ For more control you can use directly [PM2](http://pm2.keymetrics.io). Here is a
178
175
179
176
To handle daemon start at boot time, please visit [PM2-Startup](http://pm2.keymetrics.io/docs/usage/startup/).
180
177
181
-
### In Docker
178
+
# Docker
182
179
183
-
#### Installing and running
180
+
## Installing and running
184
181
The following commands assume that the Ethereum node is either running locally or in docker with `--net host`.
185
182
For other options you should check out [CLI options](#cli-options).
The docker commands are run with `-d`, that means `ethstats-cli` is started in non-interactive mode.
215
-
216
-
To run in interactive mode change `-d` to `-it` and remove the `--register` option along with `--account-email` and `--node-name`.
217
-
218
-
If you already had a configuration file, the settings from that file will be used and the command line ignored. Delete the files in `/opt/ethstats-cli` to add a node with different settings.
219
-
220
-
#### Updating
211
+
## Updating
221
212
222
213
If you started from `alethio/ehtstats-cli` docker image:
0 commit comments