-
Notifications
You must be signed in to change notification settings - Fork 166
Improve status log #127
Comments
Also TODO: Use |
Now I think this task is bigger that we expected, let's move it to a next release? |
solution: use a go func connected to the node's Ethereum to grab and calculate relevant logs rel ethereumproject#127 --- TODO: fix or remove: - downloading-from peers, eg 'this var/x/x peers' - shows mode 'FullSync' before downloader initializes, even if it will be 'FastSync'
solution: use a go func connected to the node's Ethereum to grab and calculate relevant logs rel ethereumproject#127 --- TODO: fix or remove: - downloading-from peers, eg 'this var/x/x peers' - shows mode 'FullSync' before downloader initializes, even if it will be 'FastSync'
solution: use a go func connected to the node's Ethereum to grab and calculate relevant logs rel ethereumproject#127 rel ethereumproject#318 --- TODO: fix or remove: - downloading-from peers, eg 'this var/x/x peers' - shows mode 'FullSync' before downloader initializes, even if it will be 'FastSync'
solution: - remove dead code, old notes - remove units from --log-pace= argument, just use seconds as value (simpler is better) - if mining, show STATUS MINE with minerthreads and hashrate (TODO: more?) - gofmt Rel ethereumproject#127, ethereumproject#318
Creates option '--log-status="sync=<num seconds>". Also refactors existing geth commands to own file. ---- __Squash history__: * sketches for using API for logging... may be overkill may be worth thinking about more flexible and beautiful ways to display information... 'monitor', 'attach', etc, along with termui, graphs... output can be 'machiney'-- line-by-line, or human-y -- pictures of buffalo and whatnot. * 💾 * WIP: problem: should implement interval-based status logging solution: use a go func connected to the node's Ethereum to grab and calculate relevant logs rel #127 rel #318 --- TODO: fix or remove: - downloading-from peers, eg 'this var/x/x peers' - shows mode 'FullSync' before downloader initializes, even if it will be 'FastSync' * problem: no reason to force RPC solution: comment code and include small explanation * problem: no reason to return eth from StartNode solution: remove exploratory code that is not useless * problem: warning log should use logger.Warn solution: move to Warn from Error * problem: log-pace flag usage antiquated solution: update it and simplify * problem: should polish log-pace function solution: - remove dead code, old notes - remove units from --log-pace= argument, just use seconds as value (simpler is better) - if mining, show STATUS MINE with minerthreads and hashrate (TODO: more?) - gofmt Rel #127, #318 * problem: minor variable renaming and comments solution: improve legibility * problem: logging genesis account balances on Core log-level is too high solution: relegate to debug * problem: can share interrupt chan solution: share chan in main between shutdown and closing status log goroutine * problem: logging to dir should also output to stderr solution: implement and glog SetAlsoToStdErr exported function and use in case of --log-dir * problem: log io flush never called after interrupt results in missing any logs after shutdown processes in FS logs solution: defer log Flush after shutdown services also decrease flushInterval from 30 -> 5 seconds (rate at which log buffer is written to FS) * problem: rename '--log-pace' to '--log-status' solution: rename flag and flagvar and status log function also adds logstatus flag to correct category for usage output * problem: want --log-status to be extensible for other interfaces solution: refactor to use '--log-status='sync=60'' syntax, which can eventually support other features besides 'sync', eg. mine, net, disk * problem: (nonfunctional,refactor) should move cmd-oriented functions to cmd.go solution: cut and paste and update imports * solution: run gofmt * problem: rollback command logging confirmation should check fastblock solution: error if neither fastblock nor fullblock match desired head number fixes #325 * problem: interrupt shutdown processes not consistent solution: don't share os-interrupt channel as a global. Notify library documentation clearly says Notify events can be called multiple times and notification will be copied, so there's no harm in listening for the same event on mutliple channels. This pattern avoids a global and encourages per-feature handling of shutdown scenarios. * problem: (log syntax) log-status interval initial log still shows 'log-pace' wording solution: fix
Closing via #324 |
|
Maybe you can describe what you're seeing when not working for you on linux?
because I anticipated that there may be other status logs that would eventually want to be included, like
For example:
Perhaps this may be an opportunity to think about other
One possible simple solve for your complaints would be to change the default settings for
|
|
Updated
Where:
|
So for all modes besides And |
And are all error and warning logs entirely suppressed? I'm inclined to print both, and attention has been paid to sorting out warning/error/fatals so severities like error and fatal should be actually relevant (Currently Error and Fatal logs will rise to Example (artificial) current error: E1213 15:00:00.417481 eth/downloader/downloader:654] err: could not remove peer adsfasd212341234 (Peer not registered) Example current fatal: F1213 15:00:00.417481 logger/glog/glog.go:1204] remove /Users/ia/Library/EthereumClassic/mainnet/log/geth.mh.ia.log.INFO.20171213-142408.9369: no such file or directory
goroutine 31349 [running]:
github.com/ethereumproject/go-ethereum/logger/glog.stacks(0xc420060200, 0xc42888cf00, 0xb2, 0x25e)
/Users/ia/gocode/src/github.com/ethereumproject/go-ethereum/logger/glog/glog.go:1036 +0xcf
github.com/ethereumproject/go-ethereum/logger/glog.(*loggingT).output(0x50c7a20, 0xc400000003, 0xc4200826e0, 0x4fc017d, 0x13, 0x4b4, 0x0)
/Users/ia/gocode/src/github.com/ethereumproject/go-ethereum/logger/glog/glog.go:987 +0x327
github.com/ethereumproject/go-ethereum/logger/glog.(*loggingT).printDepth(0x50c7a20, 0xc400000003, 0x1, 0xc425c37f70, 0x1, 0x1) Also, @splix What are your reasons for showing |
Yes, for Import it should print it at the moment of import. Other statuses just aggregation, one per minute. Errors/warning should be displayed in normal way, but we may want to reconsider what should be logged as error/warning. It's a separate issue |
Closed with #423 |
Currently geth has non-informative log, displaying download status only every 2048 blocks, which can take several hours per log line for block range 2,4xx,xxx.
It's better to display status every 1 minute, with details similar to Parity's. Suggested log is:
Where:
Fast
/Sync
for initial sync,Import
after that#3124787 of #3124363
- block X of total height Yc76c…34e7
block hash77/ 242/ 7 blk/tx/mgas sec
performance for past minute, avg blocks/transactions/mgas processed per second. 3 character for block, 4 for transactions, 2 for mgas1/ 4/25 peers
download from 1 peer, connected to 4, of max 25. 2 characters for each partThe text was updated successfully, but these errors were encountered: