bStats
bStats copied to clipboard
System information
first thing i noticed was that the system arch is not reporting correctly. the two servers i have it being tested on are both Intel(R) Xeon(R) CPU E5-2670 and it is being reported as amd64
am using the standard metrics code.
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.
What might be useful would be not using the kernel version for linux but instead the distro version.
@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.
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.
@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.