hardinfo
hardinfo copied to clipboard
More CPU Information (x86)
i-nex project has a lot of CPU information in machine-readable format (JSON); maybe we could use it as well?
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.
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?
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.
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?
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.
Yeah, that might be an option. Found this thing here which might be helpful to fool around: https://github.com/LouisT/node-wikichip
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.
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.
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).
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.)
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.