aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/main.go1
-rw-r--r--cmd/geth/monitorcmd.go7
-rw-r--r--cmd/utils/flags.go6
3 files changed, 13 insertions, 1 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 6a52159ea..3e945687b 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -272,6 +272,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils.LogJSONFlag,
utils.PProfEanbledFlag,
utils.PProfPortFlag,
+ utils.MetricsEnabledFlag,
utils.SolcPathFlag,
utils.GpoMinGasPriceFlag,
utils.GpoMaxGasPriceFlag,
diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go
index 05965f009..6a7e1cbb4 100644
--- a/cmd/geth/monitorcmd.go
+++ b/cmd/geth/monitorcmd.go
@@ -75,7 +75,12 @@ func monitor(ctx *cli.Context) {
if len(monitored) == 0 {
list := expandMetrics(metrics, "")
sort.Strings(list)
- utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
+
+ if len(list) > 0 {
+ utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
+ } else {
+ utils.Fatalf("No metrics specified.\n\nNo metrics collected (--metrics)\n")
+ }
}
sort.Strings(monitored)
if cols := len(monitored) / ctx.Int(monitorCommandRowsFlag.Name); cols > 6 {
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 15a577a07..0d59980ec 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -10,6 +10,8 @@ import (
"path/filepath"
"runtime"
+ "github.com/ethereum/go-ethereum/metrics"
+
"github.com/codegangsta/cli"
"github.com/ethereum/ethash"
"github.com/ethereum/go-ethereum/accounts"
@@ -187,6 +189,10 @@ var (
Usage: "Port on which the profiler should listen",
Value: 6060,
}
+ MetricsEnabledFlag = cli.BoolFlag{
+ Name: metrics.MetricsEnabledFlag,
+ Usage: "Enables metrics collection and reporting",
+ }
// RPC settings
RPCEnabledFlag = cli.BoolFlag{