Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs stats bw contains extra row with unused headers #4620

Closed
victorb opened this issue Jan 29, 2018 · 2 comments
Closed

ipfs stats bw contains extra row with unused headers #4620

victorb opened this issue Jan 29, 2018 · 2 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands

Comments

@victorb
Copy link
Member

victorb commented Jan 29, 2018

Version information:

go-ipfs version: 0.4.14-dev-cfdcd98
Repo version: 6
System version: amd64/linux
Golang version: go1.9.1

Type:

Bug

Severity:

Low

Description:

When running ipfs stats bw, the first row contains some type of headers who I guess I meant is to show some values as well, but no values are to be seen.

This is the output:

Total Up    Total Down  Rate Up     Rate Down
Bandwidth
TotalIn: 3.7 MB
TotalOut: 1.3 MB
RateIn: 1.1 kB/s
RateOut: 425 B/s

First, the labels are not consistent with the labels below, and they also don't show any information.

@victorb victorb added the kind/bug A bug in existing code (including security flaws) label Jan 29, 2018
@kevina
Copy link
Contributor

kevina commented Jan 29, 2018

P.R. #3856 is the culprit. The header line is meant for the --poll option, which before that commit was only outputted when that option was used. More to the point, this is the normal output:

Bandwidth
TotalIn: 11 MB
TotalOut: 5.6 MB
RateIn: 17 kB/s
RateOut: 11 kB/s

and this is the output with --poll:

Total Up    Total Down  Rate Up     Rate Down
   16 kB       18 kB        13 B/s      14 B/s

Note that the commit also changed the behavior of --poll a bit. Before the stats line was updated in place, now interval creates a new line. I am not sure if this is a good or bad thing.

CC: @keks

@kevina kevina added the topic/commands Topic commands label Jan 31, 2018
@kevina kevina self-assigned this Feb 7, 2018
@kevina
Copy link
Contributor

kevina commented Feb 7, 2018

Okay, this should be an easy fix. I will try to have a p.r. in in the next day or so.

@ghost ghost assigned Kubuxu Mar 21, 2018
@ghost ghost added the status/in-progress In progress label Mar 21, 2018
@ghost ghost removed the status/in-progress In progress label Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

3 participants