linuxΪʲôÏÔʾcpuÐÅϢʧ°Ü
linuxÏÔʾcpuÐÅϢʧ°ÜµÄÔµ¹ÊÔÓÉÊÇ£º1¡¢ÈôÊÇûÓÐ×°ÖÃlscpu£¬¾ÍÎÞ·¨Ê¹ÓøÃÏÂÁîÉó²écpuÐÅÏ¢£»2¡¢ÔÚ·ÇrootÓû§ÏÂʵÑéʹÓÃlscpu£¬Ôò¿ÉÄÜ»áÊܵ½È¨ÏÞȱ·¦µÄ¹ýʧÐÅÏ¢£»3¡¢ÔÚijЩÐéÄâ»úÇéÐÎÖУ¬»òÕß¿ÉÄÜÊÇÓ²¼þ¹ÊÕϵÄЧ¹û£¬ÏµÍ³¿ÉÄÜÎÞ·¨»ñÈ¡cpuÐÅÏ¢¡£
±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£
ÏÔʾCPUÐÅϢʧ°Ü¿ÉÄÜÊÇÓÉÓÚÒÔÏÂÔµ¹ÊÔÓÉÖ®Ò»£º
1. ûÓÐ×°ÖÃlscpu
ÈôÊÇûÓÐ×°ÖÃlscpu£¬¾ÍÎÞ·¨Ê¹ÓøÃÏÂÁîÉó²éCPUÐÅÏ¢¡£ÔÚÖÕ¶ËÖÐÔËÐÐÒÔÏÂÏÂÁîÀ´¼ì²éÊÇ·ñÒÑ×°ÖÃlscpu£º
``` lscpu ```
µÇ¼ºó¸´ÖÆ
ÈôÊÇÊä³öЧ¹ûΪ¡°lscpu£ºÏÂÁîδÕÒµ½¡±£¬ÔòÅú×¢ÄãÐèҪװÖÃlscpu¡£
ÔÚDebian»òUbuntuÉÏ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî×°ÖÃlscpu£º
``` sudo apt-get install util-linux ```
µÇ¼ºó¸´ÖÆ
ÔÚFedora¡¢CentOS»òRed Hat Enterprise Linux£¨RHEL£©ÉÏ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî×°ÖÃlscpu£º
``` sudo yum install util-linux ``
µÇ¼ºó¸´ÖÆ
2. ûÓÐ×ã¹»µÄȨÏÞ
ÈôÊÇÔÚ·ÇrootÓû§ÏÂʵÑéʹÓÃlscpu£¬Ôò¿ÉÄÜ»áÊܵ½È¨ÏÞȱ·¦µÄ¹ýʧÐÅÏ¢¡£ÒªÒÔrootȨÏÞÔËÐÐlscpu£¬ÇëʹÓÃÒÔÏÂÏÂÁ
``` sudo lscpu ```
µÇ¼ºó¸´ÖÆ
3. CPUÐÅÏ¢²»¿ÉÓÃ
ÔÚijЩÇéÐÎÏ£¬ÏµÍ³¿ÉÄÜÎÞ·¨»ñÈ¡CPUÐÅÏ¢¡£Õâ¿ÉÄܱ¬·¢ÔÚijЩÐéÄâ»úÇéÐÎÖУ¬»òÕß¿ÉÄÜÊÇÓ²¼þ¹ÊÕϵÄЧ¹û¡£ÈôÊÇÎÞ·¨»ñÈ¡CPUÐÅÏ¢£¬ÔòÎÞ·¨Ê¹ÓÃlscpuµÈ¹¤¾ßÀ´Éó²éËüÃÇ¡£
×ÜÖ®£¬Òª½â¾öÏÔʾCPUÐÅϢʧ°ÜµÄÎÊÌ⣬¿ÉÄÜÐèҪװÖÃlscpuÈí¼þ°ü£¬²¢¼ì²éÊÇ·ñ¾ßÓÐ×ã¹»µÄȨÏÞÀ´ÔËÐÐËü¡£ÈôÊÇϵͳÎÞ·¨»ñÈ¡CPUÐÅÏ¢£¬ÔòÐèÒª¶ÔÓ²¼þ¾ÙÐйÊÕÏɨ³ýÒÔÕÒ³öÎÊÌâ¡£
ÒÔÉϾÍÊÇlinuxΪʲôÏÔʾcpuÐÅϢʧ°ÜµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡