From 22c7ce0162f2d14a7340e00e93697780c91d2087 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 23 Jun 2015 19:20:20 +0200 Subject: cmd/geth: version bump 0.9.33 --- cmd/geth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 5a0f523a6..963aced15 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -46,7 +46,7 @@ import ( const ( ClientIdentifier = "Geth" - Version = "0.9.32" + Version = "0.9.33" ) var ( -- cgit v1.2.3 From e5b820c47b9343d3801e1ebbeb4a8f40843ea87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 24 Jun 2015 14:38:58 +0300 Subject: cmd/geth, rpc/api: extend metrics API, add a basic monitor command --- cmd/geth/main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 963aced15..f7b4810cd 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -214,6 +214,16 @@ The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console. This command allows to open a console on a running geth node. +`, + }, + { + Action: monitor, + Name: "monitor", + Usage: `Geth Monitor: node metrics monitoring and visualization`, + Description: ` +The Geth monitor is a tool to collect and visualize various internal metrics +gathered by the node, supporting different chart types as well as the capacity +to display multiple metrics simultaneously. `, }, { -- cgit v1.2.3 From b98b444179ed16d54fab1ff416cf561427151f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 25 Jun 2015 10:36:47 +0300 Subject: cmd/geth: add attach and rows flags to the monitor command --- cmd/geth/main.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index f7b4810cd..f1c229d1f 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -72,6 +72,7 @@ func init() { upgradedbCommand, removedbCommand, dumpCommand, + monitorCommand, { Action: makedag, Name: "makedag", @@ -214,16 +215,6 @@ The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console. This command allows to open a console on a running geth node. -`, - }, - { - Action: monitor, - Name: "monitor", - Usage: `Geth Monitor: node metrics monitoring and visualization`, - Description: ` -The Geth monitor is a tool to collect and visualize various internal metrics -gathered by the node, supporting different chart types as well as the capacity -to display multiple metrics simultaneously. `, }, { -- cgit v1.2.3 From c0343c8f17de0b896d4c0546921881a92ce4ae1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 25 Jun 2015 13:47:06 +0300 Subject: cmd/geth: add memory stat collection too --- cmd/geth/main.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index f1c229d1f..53f6a95d9 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -30,6 +30,7 @@ import ( "runtime" "strconv" "strings" + "time" "github.com/codegangsta/cli" "github.com/ethereum/ethash" @@ -42,6 +43,7 @@ import ( "github.com/ethereum/go-ethereum/rpc/comms" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" + "github.com/rcrowley/go-metrics" ) const ( @@ -285,6 +287,28 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso } return nil } + // Start system runtime metrics collection + go func() { + used := metrics.GetOrRegisterMeter("system/memory/used", metrics.DefaultRegistry) + total := metrics.GetOrRegisterMeter("system/memory/total", metrics.DefaultRegistry) + mallocs := metrics.GetOrRegisterMeter("system/memory/mallocs", metrics.DefaultRegistry) + frees := metrics.GetOrRegisterMeter("system/memory/frees", metrics.DefaultRegistry) + + stats := make([]*runtime.MemStats, 2) + for i := 0; i < len(stats); i++ { + stats[i] = new(runtime.MemStats) + } + for i := 1; ; i++ { + runtime.ReadMemStats(stats[i%2]) + + used.Mark(int64(stats[i%2].Alloc - stats[(i-1)%2].Alloc)) + total.Mark(int64(stats[i%2].TotalAlloc - stats[(i-1)%2].TotalAlloc)) + mallocs.Mark(int64(stats[i%2].Mallocs - stats[(i-1)%2].Mallocs)) + frees.Mark(int64(stats[i%2].Frees - stats[(i-1)%2].Frees)) + + time.Sleep(3 * time.Second) + } + }() } func main() { -- cgit v1.2.3 From e9c0b5431cbd7430ddec9fd17983241018fd8a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 25 Jun 2015 16:19:42 +0300 Subject: cmd/geth: finalize mem stats --- cmd/geth/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 53f6a95d9..fcf7f27f0 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -289,10 +289,10 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso } // Start system runtime metrics collection go func() { - used := metrics.GetOrRegisterMeter("system/memory/used", metrics.DefaultRegistry) - total := metrics.GetOrRegisterMeter("system/memory/total", metrics.DefaultRegistry) - mallocs := metrics.GetOrRegisterMeter("system/memory/mallocs", metrics.DefaultRegistry) + allocs := metrics.GetOrRegisterMeter("system/memory/allocs", metrics.DefaultRegistry) frees := metrics.GetOrRegisterMeter("system/memory/frees", metrics.DefaultRegistry) + inuse := metrics.GetOrRegisterMeter("system/memory/inuse", metrics.DefaultRegistry) + pauses := metrics.GetOrRegisterMeter("system/memory/pauses", metrics.DefaultRegistry) stats := make([]*runtime.MemStats, 2) for i := 0; i < len(stats); i++ { @@ -301,10 +301,10 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso for i := 1; ; i++ { runtime.ReadMemStats(stats[i%2]) - used.Mark(int64(stats[i%2].Alloc - stats[(i-1)%2].Alloc)) - total.Mark(int64(stats[i%2].TotalAlloc - stats[(i-1)%2].TotalAlloc)) - mallocs.Mark(int64(stats[i%2].Mallocs - stats[(i-1)%2].Mallocs)) + allocs.Mark(int64(stats[i%2].Mallocs - stats[(i-1)%2].Mallocs)) frees.Mark(int64(stats[i%2].Frees - stats[(i-1)%2].Frees)) + inuse.Mark(int64(stats[i%2].Alloc - stats[(i-1)%2].Alloc)) + pauses.Mark(int64(stats[i%2].PauseTotalNs - stats[(i-1)%2].PauseTotalNs)) time.Sleep(3 * time.Second) } -- cgit v1.2.3 From 2aeeb72fa5c4f90d0ab072a361a678c3cdee8e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Sat, 27 Jun 2015 18:12:58 +0300 Subject: cmd/geth, metrics: separate process metric collection, add disk --- cmd/geth/main.go | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index fcf7f27f0..6a52159ea 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -39,11 +39,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/comms" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" - "github.com/rcrowley/go-metrics" ) const ( @@ -288,27 +288,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso return nil } // Start system runtime metrics collection - go func() { - allocs := metrics.GetOrRegisterMeter("system/memory/allocs", metrics.DefaultRegistry) - frees := metrics.GetOrRegisterMeter("system/memory/frees", metrics.DefaultRegistry) - inuse := metrics.GetOrRegisterMeter("system/memory/inuse", metrics.DefaultRegistry) - pauses := metrics.GetOrRegisterMeter("system/memory/pauses", metrics.DefaultRegistry) - - stats := make([]*runtime.MemStats, 2) - for i := 0; i < len(stats); i++ { - stats[i] = new(runtime.MemStats) - } - for i := 1; ; i++ { - runtime.ReadMemStats(stats[i%2]) - - allocs.Mark(int64(stats[i%2].Mallocs - stats[(i-1)%2].Mallocs)) - frees.Mark(int64(stats[i%2].Frees - stats[(i-1)%2].Frees)) - inuse.Mark(int64(stats[i%2].Alloc - stats[(i-1)%2].Alloc)) - pauses.Mark(int64(stats[i%2].PauseTotalNs - stats[(i-1)%2].PauseTotalNs)) - - time.Sleep(3 * time.Second) - } - }() + go metrics.CollectProcessMetrics(3 * time.Second) } func main() { -- cgit v1.2.3 From 01fe97211354d13ecaba8a52c82b808b7a7e8393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 29 Jun 2015 16:11:01 +0300 Subject: cmd, core, eth, metrics, p2p: require enabling metrics --- cmd/geth/main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/geth/main.go') 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, -- cgit v1.2.3 From 8f504063f465e0ca10c6bb53ee914d10a3d45c86 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 30 Jun 2015 02:11:54 +0200 Subject: cmd/geth: version bump 0.9.34 --- cmd/geth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/geth/main.go') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 3e945687b..f4d2f94fe 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -48,7 +48,7 @@ import ( const ( ClientIdentifier = "Geth" - Version = "0.9.33" + Version = "0.9.34" ) var ( -- cgit v1.2.3