Coder Social home page Coder Social logo

System information about bstats HOT 6 OPEN

EndCoder-Tuts avatar EndCoder-Tuts commented on August 17, 2024
System information

from bstats.

Comments (6)

Alvin-LB avatar Alvin-LB commented on August 17, 2024 2

Why is 'amd64' wrong? Are your CPUs 32 bit?

It might be useful to know that 'amd64' doesn't just refer to AMD CPUs. It can be used for any 64 bit CPU. I do believe the 'amd' part comes from the fact that AMD where the first ones to produce a 64 bit processor, so the architecture has sort of been named after them.

Another thing that is misleading though is that the architecture returned by System.getProperty("os.arch") (which is what I assume bStats uses) doesn't always reflect the architecture of the system itself, it returns the architecture of the JRE. You could for example have a 64 bit machine running a 32 bit JRE, in which case System.getProperty("os.arch") would return "x86" (meaning 32 bit.. I know, these naming schemes are stupid). I'm not aware of any easy way to fix this though, it would require native code to detect the real architecture of the system. Although perhaps a little note explaining the situation would be nice.

from bstats.

BrainStone avatar BrainStone commented on August 17, 2024 1

@BtoBastian I think size isn't really an issue tbh. I'd say you can shade the OS class in. Or maybe extract the code that detects the OS version.

I mean jusing this fork: https://github.com/graylog-labs/os-platform-finder the compiled jar is only 10 KB's

When you leave out the app.class and shade it, I think it's ok.

from bstats.

EndCoder-Tuts avatar EndCoder-Tuts commented on August 17, 2024

am using the standard metrics code.

from bstats.

BrainStone avatar BrainStone commented on August 17, 2024

What might be useful would be not using the kernel version for linux but instead the distro version.

from bstats.

Bastian avatar Bastian commented on August 17, 2024

@Alvin-LB already explained the problem pretty good. bStats uses the "os.arch" property which returns the architecture of the JRE. There is no easy way to fix this.

Getting the Linux distribution is also quite complicated. It is possible (e.g. using https://github.com/aurbroszniowski/os-platform-finder), but it's too big for the simple Metrics classes. Maybe I can do this on the backend.

from bstats.

EndCoder-Tuts avatar EndCoder-Tuts commented on August 17, 2024

That answers the question very well. would be expecting either x86 or x64. also noticed that core count seems to be returning thread count instead of core count.

from bstats.

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.