Mac/Linux/Windows : Get CPU information from command line
Writing these down here for future references, will be handy with comes to identifying a machine's CPU information during system maintenance time. Below are the command line tools to get the CPU information in Windows, Mac OS X and Linux.
Linux:
$cat /proc/cpuinfo
Mac OS X:
$sysctl -n machdep.cpu.brand_string
Windows 8 and above:
C:>wmic cpu full /format:list
NOTE: For Windows, without the /format:list
... the output result will be almost impossible to read. You can choose to use /format:htable
for HTML, /format:csv
for csv format or /format:xml
for xml format as well.
References:
https://adamscheller.com/systems-administration/find-cpu-model-linux/
http://osxdaily.com/2011/07/15/get-cpu-info-via-command-line-in-mac-os-x/
http://www.pearsonitcertification.com/articles/article.aspx?p=1700427&seqNum=4
See also : Golang : Get hardware information such as disk, memory and CPU usage
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+10.7k Golang : Command line file upload program to server example
+16.6k Golang : Read integer from file into array
+9.8k Golang : Check if user agent is a robot or crawler example
+7.7k Golang : Ways to recover memory during run time.
+8.9k Golang : Go as a script or running go with shebang/hashbang style
+6.8k Nginx : Password protect a directory/folder
+20k Golang : Compare floating-point numbers
+18.5k Golang : Iterating Elements Over A List
+14.9k Golang : Search folders for file recursively with wildcard support
+9.2k Golang : How to get ECDSA curve and parameters data?
+13.1k CodeIgniter : "Fatal error: Cannot use object of type stdClass as array" message