79483277

Date: 2025-03-04 09:58:29
Score: 0.5
Natty:
Report link

As mentioned by @cardamom, linux command lscpu returns a lot of interesting information. Note that their is an option (-J, --json) to get the output in the JSON format. This make it much easier to parse in python.

import json
import subprocess

cpu_info = json.loads(subprocess.check_output("lscpu -J", shell=True))
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Remi Cuingnet