diff --git a/cmd/lotus-chainwatch/main.go b/cmd/lotus-chainwatch/main.go index 4972c1d0d..bcea3193d 100644 --- a/cmd/lotus-chainwatch/main.go +++ b/cmd/lotus-chainwatch/main.go @@ -1,7 +1,6 @@ package main import ( - _ "net/http/pprof" "os" "github.com/filecoin-project/lotus/build" diff --git a/cmd/lotus-chainwatch/run.go b/cmd/lotus-chainwatch/run.go index 2497b5315..5df81c26c 100644 --- a/cmd/lotus-chainwatch/run.go +++ b/cmd/lotus-chainwatch/run.go @@ -2,6 +2,8 @@ package main import ( "database/sql" + "net/http" + _ "net/http/pprof" "os" _ "github.com/lib/pq" @@ -25,6 +27,9 @@ var runCmd = &cli.Command{ }, }, Action: func(cctx *cli.Context) error { + go func() { + http.ListenAndServe(":6060", nil) + }() ll := cctx.String("log-level") if err := logging.SetLogLevel("*", ll); err != nil { return err