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
+21.9k Golang : Get executable name behind process ID example
+5.8k Golang : Convert(cast) io.Reader type to string
+4.2k CodeIgniter/PHP : Remove empty lines above RSS or ATOM xml tag
+9.5k Golang : Display list of countries and ISO codes
+15.8k Golang : Send email with attachment
+7.6k Golang : Use regular expression to get all upper case or lower case characters example
+13.3k Golang : Convert date format and separator yyyy-mm-dd to dd-mm-yyyy
+6.2k Golang : Gomobile init produce "iphoneos" cannot be located error
+5.4k Golang : alternative to os.Exit() function
+17.6k Golang : Count number of digits from given integer value
+7.9k Golang : Allow Cross-Origin Resource Sharing request
+12.4k Golang : How to get Unix file descriptor for console and file