hardinfo icon indicating copy to clipboard operation
hardinfo copied to clipboard

More CPU Information (x86)

Open lpereira opened this issue 5 years ago • 11 comments

i-nex project has a lot of CPU information in machine-readable format (JSON); maybe we could use it as well?

lpereira avatar Jun 28 '19 03:06 lpereira

Nice find! What I really don't like is how i-nex is actually matching cpu to the database entry. Also keeping the database up-to-date whould be a challenge.

ocerman avatar Jun 29 '19 12:06 ocerman

I looked at how things like CPU-Z does in Windows and it's even worse: it's all hardcoded (e.g. "if vendor == intel && family == 6 && stepping > 5 && l1_cache_size < 1M && ..."). The i-nex version is probably simpler to handle.

Not sure how they got this information in the first place; maybe we could ask them and have a single repository for both i-nex and HardInfo?

lpereira avatar Jun 29 '19 14:06 lpereira

We've talked about this before, and I was looking into how it could be done.

I thought of using a data format similar to vendor.ids, where properties are inherited, only matching at the "match" keyword:

  • data: https://github.com/bp0/verbose-spork/blob/work4/data/x86.funfacts
  • code: https://github.com/bp0/verbose-spork/blob/b8bc966c1a34c03090c5ca8f1baabba31413ca61/sysobj/src/gen_cpuinfo.c#L127

But it turns out that there are many quirks out there that pretty much need the hard-coded logic that @lpereira mentioned https://github.com/lpereira/hardinfo/issues/373#issuecomment-506962915. I really don't feel motivation for this, as neat as it is to have all the detailed information.

After looking at the i-nex data and code, I agree with @ocerman that it's not a very good approach. There are other rather good sources, like WikiChip. Check out the facts section near the bottom.

It's a massive amount of work to do, I think, and If we find a good source (who did all that work already), we should come up with a way to scrape/import the data with a script or something, and then direct any contributions to that source so that we're giving back and not just creating a new unmaintained database of CPU info.

bp0 avatar Jun 29 '19 16:06 bp0

Yeah, I've punted this for so long just because it's a lot of repetitive, boring work.

The WikiChip data is machine readable; I wonder if they're willing to provide a dump?

lpereira avatar Jun 29 '19 17:06 lpereira

Wikichip is using MediaWiki with Semantic MediaWiki extension which has a web API that might just be queried from HardInfo instead of keeping a separate database.

bp0 avatar Jun 29 '19 18:06 bp0

Yeah, that might be an option. Found this thing here which might be helpful to fool around: https://github.com/LouisT/node-wikichip

lpereira avatar Jun 29 '19 20:06 lpereira

Too bad that wikichip do not contain CPU name string from CPUID. That would be the easiest way how to match cpuid to database entry.

ocerman avatar Jul 06 '19 11:07 ocerman

Also I have another idea: I have discovered that CPU-Z TXT report contains useful data, like CPUID family, model, stepping, name string, code name, package, tdp, instructions... We could just parse that info and reuse it. We could make simple web form where anyone could paste their cpu-z report and simple PHP script could parse useful info to build the database. As CPU-Z works under wine, it should not be hard for average user to contribute to the database that way.

ocerman avatar Jul 06 '19 11:07 ocerman

That's also an option, but I'd rather avoid this; WikiChip has all the information CPU-Z will have, and it's possible to easily search it. I did some experiments and we can get some information by querying with only information found in /proc/cpuinfo.

I'm rewriting the server -- so that we'll be able to upload and retrieve benchmarks again -- and can make something that queries/caches the information from WikiChip for us (send /proc/cpuinfo, get distilled CPU information).

lpereira avatar Jul 06 '19 21:07 lpereira

Another source of information: http://www.cpu-world.com/CPUs/Core_i3/Intel-Core%20i3%20i3-8100.html

They provide an application that sends them CPUID information to match against their database: http://www.cpu-world.com/Download/CPU_identification.html (API isn't public, apparently.)

lpereira avatar Jul 30 '19 23:07 lpereira

I considered all the solutions you describe in the I-Nex project. I once wrote Cerbero, it was a clone of the validate cpu-z website. However, I do not have the option to restore the site. I am still working on I-Nex after a long break. And I admire the contribution made by the creator in the Hardinfo program.

eloaders avatar Dec 07 '19 13:12 eloaders