Giter Site home page Giter Site logo

Comments (9)

dagwieers avatar dagwieers commented on May 20, 2024 2

I see what you mean now. Dstat did not show any unit numbers, and only reserved 3 columns in total for most connection stats. Should be fixed now !

from dstat.

siddharth178 avatar siddharth178 commented on May 20, 2024

Btw, noticed one thing. Proc file /proc/net/tcp used by dstat doesn't have this information. That means there is no issue in dstat code. But the real issue is with data available in /proc/net/tcp.

I checked if other tools have this issue -
Tested same scenario with 'ss' and it shows correct number of active/connected sockets.

Whats missing here? Is /proc/net/tcp right choice to look for this data?

from dstat.

kkalinin avatar kkalinin commented on May 20, 2024

I've noticed the same problem. And changing tab width for dstat_socket class helps. It's value hardcoded as 3 and it shows only first 3 digits of actual number. So everything is correct while you have <= 999 sockets in any state, but if you have 1234 socket in some state, dstat will show only 1.

from dstat.

scottchiefbaker avatar scottchiefbaker commented on May 20, 2024

Is the solution just to display those numbers in decimal format? 1.2k connections?

from dstat.

kkalinin avatar kkalinin commented on May 20, 2024

I thought that the best solution would be to add one more app launch argument, something like --raw.
So, by default, the view would be human-readable. In case with tcp sockets - 1.2k, 1.2m, but in raw mode I would like to see the actual numbers, no matter of their length. But, for sure, some metrics like sent/recv bytes etc. should remain human-readable in any mode.
Still, as a quick solution, your idea is good!

Thank you!

from dstat.

dagwieers avatar dagwieers commented on May 20, 2024

@kkalinin You get the raw numbers in CSV output. We cannot print raw numbers to the screen since it messes up the whole formatting to the point it is rendered useless. (That's the problem with e.g. vmstat)

Currently one can already add --float to get floating point numbers instead of integers (when units are used). But we have to consider column width.

from dstat.

dagwieers avatar dagwieers commented on May 20, 2024

BTW Option --raw already exists, but doesn't do what you'd be expecting :-)

from dstat.

superheizai avatar superheizai commented on May 20, 2024

Want to know how did you resolve this problem?
I suffer from the same problem. I want to measure system performance with one command,dstat, but it gave me a totally different number from ss.

from dstat.

dagwieers avatar dagwieers commented on May 20, 2024

@superheizai It is fixed in the master branch. The fix is included in commit 4c47a34

from dstat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.