bStats icon indicating copy to clipboard operation
bStats copied to clipboard

System information

Open EndCoder-Tuts opened this issue 8 years ago • 6 comments

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

EndCoder-Tuts avatar Jun 17 '17 20:06 EndCoder-Tuts

am using the standard metrics code.

EndCoder-Tuts avatar Jun 17 '17 20:06 EndCoder-Tuts

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.

Alvin-LB avatar Jun 18 '17 14:06 Alvin-LB

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

BrainStone avatar Jun 18 '17 15:06 BrainStone

@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.

Bastian avatar Jun 18 '17 19:06 Bastian

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.

EndCoder-Tuts avatar Jun 19 '17 00:06 EndCoder-Tuts

@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.

BrainStone avatar Jun 19 '17 00:06 BrainStone