lpereira / hardinfo

System profiler and benchmark tool for Linux systems
http://hardinfo.org
GNU General Public License v2.0
765 stars 130 forks source link

More CPU Information (x86) #373

Open lpereira opened 5 years ago

lpereira commented 5 years ago

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

ocerman commented 5 years ago

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.

lpereira commented 5 years ago

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?

bp0 commented 5 years ago

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:

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.

lpereira commented 5 years ago

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?

bp0 commented 5 years ago

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.

lpereira commented 5 years ago

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

ocerman commented 5 years ago

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 commented 5 years ago

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.

lpereira commented 5 years ago

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 commented 5 years ago

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

eloaders commented 4 years ago

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.