16 lines
367 B
Python
16 lines
367 B
Python
import json
|
|
import sys
|
|
from libcpuid.info import CPUInfo
|
|
|
|
out_filename = sys.argv[1]
|
|
|
|
cpu_info = CPUInfo.from_current_cpu()
|
|
to_output = {
|
|
"vendor_str": cpu_info.vendor_str,
|
|
"ext_family": cpu_info.ext_family,
|
|
"ext_model": cpu_info.ext_model,
|
|
"stepping": cpu_info.stepping
|
|
}
|
|
|
|
with open(out_filename, "w") as out_file:
|
|
json.dump(to_output, out_file)
|