linux处理器
① linux鍗犵敤cpu杩囬珮鎺掓煡linux鍗犵敤cpu
linux杩涚▼鍗犵敤cpu姝e湪杩愯屾槸浠涔堢姸镐侊纻
绯荤粺杞浠舵e湪钖庡彴杩愯
linux绋嫔簭systemcpu鍗犵敤杈冮珮璇存槑浠涔堥梾棰桡纻
杩栾存槑浣犵殑绋嫔簭鍦ㄦ墽琛岃繃绋嬩腑锛屾湁濡备笅鍑犵嶆儏鍐典腑镄勪竴绉嶆垨钥呭氱嶆儏鍐靛彂鐢燂细
1.杩涘叆浜嗕竴涓姝诲惊鐜镞犳硶璺冲嚭𨱒ワ绂
2.涔熻告槸涓鐩村湪绛夊緟涓涓淇″彿锛屽备粠dbus涓婅诲彇涓涓浣犻渶瑕佺殑淇℃伅锛
3.链夊彲鑳芥槸浣犵殑绋嫔簭鍦ㄥ逛竴涓闱炲父澶х殑鍐呭硅繘琛屽垎鏋愬拰澶勭悊锛
4.链夊彲鑳芥槸浣犵殑绋嫔簭瑕佸勭悊镄勯梾棰樻瘆杈冨氾纴镓浠ュ湪涓涓涓鎱㈡参镄勬墽琛屻傚ぇ閮ㄥ垎鏄鐢变笂闱㈠洓绉嶆儏鍐靛紩璧风殑锛屽湪杩椤洓绉嶆儏鍐典腑锛岀涓绉嶆儏鍐靛潥鍐宠侀伩鍏嶏纴锲犱负涓嶅傛わ纴闾d箞浣犵殑CPU璧勬簮灏嗕细琚钖冨厜銆
绗浜岀嶆儏鍐碉纴鎴戠殑𨱍虫硶鏄锛屼綘瑕佷慨鏀逛竴涓嬶纴鐪嬬湅链夋病链変粈涔堟洿蹇锛屾洿楂樻晥镄勬柟娉曟潵銮峰彇鍒伴渶瑕佺殑淇″彿锛屾垨钥呮槸涓嶅幓銮峰彇淇″彿锛岃屾槸鏀圭敤鍏朵粬鏂瑰纺𨱒ュ勭悊銆
绗涓夊拰绗锲涗袱绉嶆儏鍐碉纴灏辫佹牴鎹浣犵殑瀹为檯闇瑕佹潵瀹氢简銆傚傛灉鏄蹇呴’杩欐牱锅氾纴闾d箞涔熷彧鑳藉熻愬绩镄勭瓑寰呬简銆备絾鏄鍙浠ヨ冭槛浼桦寲浠g爜锛屼紭鍖栫畻娉旷殑鏂瑰纺𨱒ユ彁楂樻晥鐜囥侺inux绯荤粺涓嬫湁涓寰埚ソ镄勮皟璇曞伐鍏穏db銆傚傛灉涓岖煡阆撹嚜宸辩殑绋嫔簭鍑虹幇浜嗕粈涔堥梾棰桡纴鍙浠ュ埄鐢╣db宸ュ叿阃愭ユ墽琛岋纴铡绘煡镓鹃敊璇镓鍦ㄣ
linux链嶅姟鍣╟pu鍗犵敤鐜囧緢楂樿屽唴瀛树笉楂桡纻
杈冨父瑙佺殑鍑犵被铡熷洜铡熷洜1:绋嫔簭璧风敤澶澶氲В鍐虫柟娉:鍏抽棴涓浜涚▼搴
铡熷洜2:䦅呮瘨銆佹伓镒忎唬镰佽В鍐虫柟娉:涓嬭浇链鏂扮殑阒茬梾姣掕蒋浠,𨱒姣
铡熷洜3锛氱郴缁熻繍琛屽簲鐢ㄨ蒋浠跺嚭阌欙纴阃犳垚锅沧㈠搷搴旓纸灏ゅ叾鍦╓IN98涓锛夎В鍐筹细寮鸿屽叧闂绋嫔簭锛圕TRL+ALT+DEL锛
铡熷洜4:瀹炴椂鐩戞带杞浠惰В鍐筹细鍏抽棴
铡熷洜5:闄嶆俯杞浠惰В鍐筹细鍏抽棴
铡熷洜6锛氶┍锷ㄤ笉鍏煎瑰傚畨瑁卾ia4钖1椹卞姩镄勬椂鍊欙纴鍐嶈繘绯荤粺锛岃祫婧愬崰鐢ㄧ巼锛100%瑙e喅锛氢笂缃戝綋链鏂扮殑
铡熷洜7锛氩惈HT鎶链镄凯4CPU鐢变簬镊韬璁捐$殑鍏崇郴锛堜负链澶ч檺搴︾殑鍒╃敤CPU钥屼紭鍖栵级锛屽规槗鍑虹幇鍗犵敤鐜囦负100%瑙e喅锛氩叧闂璈T铡熷洜8锛氲鍒浜哄叆渚佃В鍐虫柟娉:鐢╪etstat-an镆ョ湅鏄钖︽湁涓浜涘纾甯哥殑娲诲姩绔鍙o纴涓鑸阒茬伀澧椤彲浠ヨВ鍐抽梾棰樸
鍏跺畠铡熷洜:𨰾稢D銆佽繍琛3DMARK銆佹墦寮绮惧搧缃戠粶鐢佃嗐佺数鑴戝紑链鸿繘鍏ョ郴缁熷悗镄10澶氱挜挓銆佺数鑴戝仛链嶅姟鍣ㄧ瓑锛屽规槗鍑虹幇鍗犵敤鐜囦负100%銆
linux镆ョ湅tomcat閲岄溃鍝涓搴旂敤鍗犵敤cpu锛
linux涓嬭幏鍙栧崰鐢–PU璧勬簮链澶氱殑10涓杩涚▼锛屽彲浠ヤ娇鐢ㄥ备笅锻戒护缁勫悎锛
psaux|head-1;psaux|grep-vPID|sort-rn-k+3|head
linux涓嬭幏鍙栧崰鐢ㄥ唴瀛樿祫婧愭渶澶氱殑10涓杩涚▼锛屽彲浠ヤ娇鐢ㄥ备笅锻戒护缁勫悎锛
psaux|head-1;psaux|grep-vPID|sort-rn-k+4|head
锻戒护缁勫悎瑙f瀽锛堥拡瀵笴PU镄勶纴MEN涔熷悓镙烽亾鐞嗭级锛
psaux|head-1;psaux|grep-vPID|sort-rn-k+3|head
璇ュ懡浠ょ粍钖埚疄闄呬笂鏄涓嬮溃涓ゅ彞锻戒护锛
psaux|head-1
psaux|grep-vPID|sort-rn-k+3|head
镆ョ湅鍗犵敤cpu链楂樼殑杩涚▼
psaux|head-1;psaux|grep-vPID|sort-rn-k+3|head
鎴栬卼op锛堢劧钖庢寜涓婱锛屾敞镒忚繖閲屾槸澶у啓锛
镆ョ湅鍗犵敤鍐呭瓨链楂樼殑杩涚▼
psaux|head-1;psaux|grep-vPID|sort-rn-k+4|head
鎴栬卼op锛堢劧钖庢寜涓婸锛屾敞镒忚繖閲屾槸澶у啓锛
璇ュ懡浠ょ粍钖埚疄闄呬笂鏄涓嬮溃涓ゅ彞锻戒护锛
psaux|head-1
psaux|grep-vPID|sort-rn-k+3|head
鍏朵腑绗涓鍙ヤ富瑕佹槸涓轰简銮峰彇镙囬桡纸USERPID%CPU%锛夈
鎺ヤ笅𨱒ョ殑grep-vPID鏄灏唒saux锻戒护寰楀埌镄勬爣棰桦幓鎺夛纴鍗砱rep涓嶅寘钖玃ID杩欎笁涓瀛楁瘝缁勫悎镄勮岋纴鍐嶅皢鍏朵腑缁撴灉浣跨敤sort鎺掑簭銆
sort-rn-k+3璇ュ懡浠や腑镄-rn镄剅琛ㄧず鏄缁撴灉鍊掑簭鎺掑垪锛宯涓轰互鏁板煎ぇ灏忔帓搴忥纴钥-k+3鍒欐槸阍埚圭3鍒楃殑鍐呭硅繘琛屾帓搴忥纴鍐崭娇鐢╤ead锻戒护銮峰彇榛樿ゅ墠10琛屾暟鎹銆(鍏朵腑镄剕琛ㄧず绠¢亾镎崭綔)
linux濡备綍镆ョ湅铏氭嫙链篶pu鍗犵敤鐜囷纻
top锛宖ree锛宑at/proc/meminfo锛宑at/proc/cpuinfo銆
#dmidecode|grep-A16"MemoryDevice"|more銆
镆ョ湅鍐呭瓨浣跨敤𨱍呭喌锛歝at/proc/meminfo锛屾煡鐪婥PU浣跨敤𨱍呭喌锛歝at/proc/cpuinfo銆
鍦ㄧ郴缁熺淮鎶ょ殑杩囩▼涓锛岄殢镞跺彲鑳芥湁闇瑕佹煡鐪婥PU浣跨敤鐜囷纴骞舵牴鎹鐩稿簲淇℃伅鍒嗘瀽绯荤粺鐘跺喌镄勯渶瑕併傚湪CentOS涓锛屽彲浠ラ氲繃top锻戒护𨱒ユ煡鐪婥PU浣跨敤鐘跺喌銆
杩愯宼op锻戒护钖庯纴CPU浣跨敤鐘舵佷细浠ュ叏灞忕殑鏂瑰纺鏄剧ず锛屽苟涓斾细澶勫湪瀵硅瘽镄勬ā寮--鐢ㄥ熀浜巘op镄勫懡浠わ纴鍙浠ユ带鍒舵樉绀烘柟寮忕瓑绛夈傞鍑篓op镄勫懡浠や负q锛埚湪top杩愯屼腑鏁瞦阌涓娆★级銆
top锻戒护鏄疞inux涓嫔父鐢ㄧ殑镐ц兘鍒嗘瀽宸ュ叿锛岃兘澶熷疄镞舵樉绀虹郴缁熶腑钖勪釜杩涚▼镄勮祫婧愬崰鐢ㄧ姸鍐碉纴绫讳技浜嶹indows镄勪换锷$$悊鍣ㄣ
鍙浠ョ洿鎺ヤ娇鐢╰op锻戒护钖庯纴镆ョ湅%MEM镄勫唴瀹广傚彲浠ラ夋嫨鎸夎繘绋嬫煡鐪嬫垨钥呮寜鐢ㄦ埛镆ョ湅锛屽傛兂镆ョ湅oracle鐢ㄦ埛镄勮繘绋嫔唴瀛树娇鐢ㄦ儏鍐电殑璇濆彲浠ヤ娇鐢ㄥ备笅镄勫懡浠わ细$top-uoracle銆
② linux镆ョ湅cpu涓鏁板拰镙稿绩鏁
cpu淇℃伅璁板綍鍦/proc/cpuinfo涓銆
linux镐庝箞镆ョ湅cpu镄勪釜鏁帮纻鎴戜滑涓璧锋潵浜呜В涓涓嫔惂銆傜涓绉嶆柟娉曪细top锻戒护娉曢栧厛镓ц宼op锻戒护銆傚湪top锻戒护镄勬樉绀虹晫闱锛屾寜鏁板瓧阌1锛屽嵆鍙镆ョ湅鍒板綋鍓岖郴缁熶腑镄勬籧pu鏁般
linux绯荤粺鏂规硶/姝ラ1/proc/cpuinfo链绠鍗旷殑鏂规硶灏辨槸镆ョ湅/proc/cpuinfo锛岃繖涓铏氭嫙鏂囦欢灞旷ず镄勬槸鍙鐢–PU纭浠剁殑閰岖疆銆
榧犳爣鍙抽敭镣瑰嚮妗岄溃锛岄夋嫨钬沧墦寮缁堢钬濓纴濡备笅锲炬墍绀恒傚厛杈揿叆锻戒护钬渃at/proc/cpuinfo钬濓纴铹跺悗鍐嶆寜锲炶溅阌灏辫兘鐪嫔埌链嶅姟鍣ㄧ殑CPU淇℃伅锛屽备笅锲炬墍绀恒
镆ヨ㈤昏緫CPU镐绘暟锛歝at/proc/cpuinfo|grepprocessor|wc-l璇风偣鍑昏緭鍏ュ浘鐗囨弿杩版渶钖庯纴缁椤ぇ瀹朵粙缁崭笅CPU鍨嫔彿镄勬煡璇㈡柟寮忋
1銆佺涓绉嶆柟娉曪细top锻戒护娉曢栧厛镓ц宼op锻戒护銆傚湪top锻戒护镄勬樉绀虹晫闱锛屾寜鏁板瓧阌1锛屽嵆鍙镆ョ湅鍒板綋鍓岖郴缁熶腑镄勬籧pu鏁般
2銆佹煡鐪媍pu镐讳釜鏁版柟娉曪细棣栧厛镓ц宼op锻戒护锛屽备笅锲句腑鍐呭规墍琛ㄧず銆傚湪top锻戒护镄勬樉绀虹晫闱锛屾寜鏁板瓧阌1锛屽嵆鍙镆ョ湅鍒板綋鍓岖郴缁熶腑镄勬籧pu鏁帮纴濡备笅锲句腑鍐呭规墍琛ㄧず銆
3銆侀栧厛鏄瀵逛簬CPU镄勮存槑链嶅姟鍣–PU镐ц兘鍙傛暟涓昏佷俊鎭鍙浠ラ氲繃镆ョ湅/proc/cpuinfo銮峰缑銆
4銆佹渶绠鍗旷殑鏂规硶灏辨槸镆ョ湅/proc/cpuinfo锛岃繖涓铏氭嫙鏂囦欢灞旷ず镄勬槸鍙鐢–PU纭浠剁殑閰岖疆銆傞氲繃镆ョ湅杩欎釜鏂囦欢锛屼綘鑳借瘑鍒鍑虹墿鐞嗗勭悊鍣ㄦ暟(鎻掓Ы)銆佹疮涓狢PU镙稿绩鏁般佸彲鐢ㄧ殑CPU镙囧织瀵勫瓨鍣ㄤ互鍙婂叾瀹冧笢瑗跨殑鏁伴噺銆
5銆佽风偣鍑昏緭鍏ュ浘鐗囨弿杩颁篃鍙浠ヤ娇鐢ㄥ备笅鏂瑰纺鍗旷嫭镆ヨCPU涓鏁般佹牳鏁板强阃昏緫CPU镐绘暟銆
1銆丆PU镄勪俊鎭瀛樻斁鍦/proc/cpuinfo涓锛屽备笅锲炬墍绀猴纴physicalid浠h〃绗鍑犱釜CPU锛岀紪鍙蜂粠0寮濮嬶纴cpucores浠h〃镙告暟锛屽彲浠ョ湅鍑烘槸1棰1镙哥殑CPU锛屽嵆CPU涓鏁版槸1涓銆
2銆乴inux镐庝箞镆ョ湅cpu镙告暟锛熸垜浠涓璧锋潵浜呜В涓涓嫔惂銆傛墦寮linux绯荤粺锛屽湪linux镄勬岄溃镄勭┖锏藉勫彸鍑汇傚湪寮瑰嚭镄勪笅𨰾夐夐”閲岋纴镣瑰嚮镓揿紑缁堢銆傝緭鍏cat/proc/cpuinfo锻戒护锛屽洖杞﹁繍琛岋纴鍏朵腑cpucores浠h〃镙告暟銆
3銆佹柟娉/姝ラlinux镄刢pu淇℃伅鍙浠ヤ粠鏂囦欢涓珰puinfo璇诲彇銆傛墽琛屽懡浠わ细cat/proc/cpuinfo璇风偣鍑昏緭鍏ュ浘鐗囨弿杩版垜浠涓鑸鐪嫔埌镄刾rocessor鏄阃昏緫镙搞
4銆乧pu淇℃伅璁板綍鍦/proc/cpuinfo涓銆
1銆乧pu淇℃伅璁板綍鍦/proc/cpuinfo涓銆
2銆乴inux镐庝箞镆ョ湅cpu镄勪釜鏁帮纻鎴戜滑涓璧锋潵浜呜В涓涓嫔惂銆傜涓绉嶆柟娉曪细top锻戒护娉曢栧厛镓ц宼op锻戒护銆傚湪top锻戒护镄勬樉绀虹晫闱锛屾寜鏁板瓧阌1锛屽嵆鍙镆ョ湅鍒板綋鍓岖郴缁熶腑镄勬籧pu鏁般
3銆佹墦寮xshell杞浠惰繛鎺ヤ笂linux链嶅姟鍣ㄣ傝緭鍏ユ寚浠ゃ恈at/proc/cpuinfo|grepname|cut-f2-d锛殀uniq-c銆戞煡鐪媍pu鍨嫔彿淇℃伅銆傜劧钖庤緭鍏ユ寚浠ゃ恎repphysicalid/proc/cpuinfo|sort|uniq|wc-l銆戣缮鍙浠ユ煡鐪媍pu鐗╃悊涓鏁般
4銆佹煡璇㈤昏緫CPU镐绘暟锛歝at/proc/cpuinfo|grepprocessor|wc-l璇风偣鍑昏緭鍏ュ浘鐗囨弿杩版渶钖庯纴缁椤ぇ瀹朵粙缁崭笅CPU鍨嫔彿镄勬煡璇㈡柟寮忋
5銆佹煡cpu鏁扮殑鏂规硶绗涓绉嶆柟娉曪细top锻戒护娉曞湪top锻戒护镄勬樉绀虹晫闱锛屾寜鏁板瓧阌1锛屽嵆鍙镆ョ湅鍒板綋鍓岖郴缁熶腑镄勬籧pu鏁帮纴濡备笅锲句负4镙哥殑cpu銆
镆ョ湅linux绯荤粺CPU淇℃伅镄勬柟娉曞伐鍏/铡熸枡linux绯荤粺鏂规硶/姝ラ1/proc/cpuinfo链绠鍗旷殑鏂规硶灏辨槸镆ョ湅/proc/cpuinfo锛岃繖涓铏氭嫙鏂囦欢灞旷ず镄勬槸鍙鐢–PU纭浠剁殑閰岖疆銆
Linux锻戒护琛屽彲浠ヤ娇鐢╰op鎴栬卾mstat锻戒护镆ョ湅绯荤粺镄凛PU鍜屽唴瀛树娇鐢ㄦ儏鍐点
鍦ㄧ数鑴戜腑杩涘叆Linux镎崭綔绯荤粺锛屾墦寮Linux锻戒护鐣岄溃銆傚湪Linux锻戒护鐣岄溃涓杈揿叆cat/proc/meminfo锻戒护钖庯纴鏁插嚮阌阌鐩桦洖杞﹂敭銆傚湪鏁插嚮瀹屽洖杞﹂敭钖庯纴鍑虹幇MemTotal鍜孧emFree鍒嗗埆灏辨槸鍙鏀閰嶅唴瀛桦拰绌洪棽鍐呭瓨浜嗐
linux濡备綍镆ョ湅cpu鍨嫔彿锛屼负鎭ㄦ彁渚沴inux濡备綍镆ョ湅cpu鍨嫔彿锲炬枃淇℃伅锛屾墦寮linux绯荤粺锛屽湪linux镄勬岄溃镄勭┖锏藉勫彸鍑汇傚湪寮瑰嚭镄勪笅𨰾夐夐”閲岋纴镣瑰嚮镓揿紑缁堢銆
③ linux镆ョ湅cpu鍨嫔彿锻戒护linux镆cpu
linux镆ョ湅cpu棰戠巼锛
linux绯荤粺濡备綍镆ョ湅cpu棰戠巼锛屾湁寰埚氱嶆柟娉曪纴链绠渚跨殑鏄鍙浠ュ湪Gnome涓嬫煡鐪嬨
鍦℅nome凿滃崟镙忕殑搴曢儴闱㈡澘涓婄偣鍙抽敭钬>娣诲姞鍒伴溃𨱒縚>CPU棰戠巼锣冨洿鐩戣嗗櫒锛岀劧钖巊nome闱㈡澘涓婂氨浼氩嚭鐜版ゅ皬宸ュ叿锛屽苟鏄剧ず褰揿墠镄勯戠巼锛岀偣宸﹂敭鍙鍑虹幇鍙璋冭妭镄勯戠巼锻戒护琛屼笅镆ョ湅銆
AIX鍜孡inux涓嫔备綍镆ョ湅CPU鍜屽唴瀛树俊鎭锛
AIX镄勭‖浠朵俊鎭鍙浠ラ氲繃prtconf锻戒护鐪嫔埌銆
1.镆ョ湅阃昏緫CPU涓鏁
#pmcycles-m
CPU0runsat4204MHz
CPU1runsat4204MHz
CPU2runsat4204MHz
CPU3runsat4204MHz
CPU4runsat4204MHz
CPU5runsat4204MHz
CPU6runsat4204MHz
CPU7runsat4204MHz
涓婇溃鎻忚堪链8涓狢PU锛孋PU镄勪富棰戜负4.2G璧鍏
2.镆ョ湅鐗╃悊CPU涓鏁
#prtconf|grepProcessors
NumberOfProcessors:4
3.纭瀹欳PU鏄鍑犳牳
鐢ㄩ昏緫CPU闄や互鐗╃悊CPU灏辨槸镙告暟銆
4.镆ョ湅鍗曚釜CPU镄勮︾粏淇℃伅
#lsattr-E-lproc0
smt_
smt_
typePowerPC_POWER6ProcessortypeFalse
Linux镎崭綔绯荤粺
Linux涓嬬殑CPU淇℃伅鍏ㄩ儴閮藉湪/proc/cpuinfo杩欎釜鏂囦欢涓锛屽彲浠ョ洿鎺ユ墦寮鐪嬨
1.镆ョ湅鐗╃悊CPU镄勪釜鏁
#cat/proc/cpuinfo|grep"physicalid"|sort|uniq|wc-l
2.镆ョ湅阃昏緫CPU镄勪釜鏁
#cat/proc/cpuinfo|grep"processor"|wc-l
3.镆ョ湅CPU鏄鍑犳牳
#cat/proc/cpuinfo|grep"cores"|uniq
4.镆ョ湅CPU镄勪富棰
#cat/proc/cpuinfo|grepMHz|uniq
xshell杩炴帴链嶅姟鍣ㄦ煡鐪媍pu閰岖疆锛
鎴戠殑锛1.镆ョ湅CPU镄勫瀷鍙凤细
#more/proc/cpuinfo|grepname|cut-f2-d:
杈揿嚭缁撴灉锛
Intel锛圧锛塜eon(R)[email protected]
2.镆ョ湅CPU镄勪綅鏁帮细
#getconfLONG_BIT
杈揿嚭缁撴灉鏄锛64
3.镆ョ湅CPU鐗╃悊镄勪釜鏁帮细
#more/proc/cpuinfo|grepphysicalid|sort-n|uniq|wc-l
杈揿嚭缁撴灉锛2
琛ㄧずLinux链嶅姟鍣ㄤ笂闱㈠畨瑁呬简2涓鐗╃悊CPU鑺鐗囥
4.镆ョ湅CPU镄勫唴镙镐釜鏁帮细
#more/proc/cpuinfo|grepcpucores|uniq
镆ヨ㈢粨鏋沧槸锛14
琛ㄧず涓棰楃墿鐞咰PU閲岄溃链14涓狢PU鍐呮牳锛屽崟鍧桟PU涓婂勭悊鏁版嵁镄勮姱鐗囩粍鏁伴噺鏄14銆
5.镆ョ湅姣忛楃墿鐞咰PU涓镄勯昏緫CPU涓鏁帮细
#more/proc/cpuinfo|grepsiblings|uniq
杈揿嚭缁撴灉锛
siblings:28
6.镆ョ湅CPU鏄钖﹀紑钖浜呜秴绾跨▼鎶链锛
#more/proc/cpuinfo|egrepcpucores|siblings|sort|uniq
杈揿嚭缁撴灉锛
cpucores:14
siblings:28
濡傛灉cpucores鏁伴噺鏄痵iblings镄勪竴鍗婏纴璇存槑寮钖浜呜秴绾跨▼鎶链銆
濡傛灉cpucores涓巗iblings鏁伴噺涓镊达纴璇存槑娌℃湁寮钖瓒呯嚎绋嬫妧链銆
7.镆ョ湅阃昏緫CPU涓鏁帮绂
#more/proc/cpuinfo|grepprocessor|uniq|wc-l
杈揿嚭缁撴灉鏄锛56銆
璇存槑阃昏緫CPU涓鏁版槸56銆傞昏緫CPU涓鏁=鐗╃悊CPU涓鏁皒CPU鍐呮牳鏁皒姣忛楃殑纭浠剁嚎绋嬫暟銆
linux镆ョ湅姣忎釜cpu浣跨敤鐜囷纻
鐢╰op锻戒护鍙瀹炵幇
top锻戒护鏄疞inux涓嫔父鐢ㄧ殑镐ц兘鍒嗘瀽宸ュ叿锛岃兘澶熷疄镞舵樉绀虹郴缁熶腑钖勪釜杩涚▼镄勮祫婧愬崰鐢ㄧ姸鍐碉纴绫讳技浜嶹indows镄勪换锷$$悊鍣ㄣ
杩愯宼op锻戒护钖庯纴CPU浣跨敤鐘舵佷细浠ュ叏灞忕殑鏂瑰纺鏄剧ず锛屽苟涓斾细澶勫湪瀵硅瘽镄勬ā寮--鐢ㄥ熀浜巘op镄勫懡浠わ纴鍙浠ユ带鍒舵樉绀烘柟寮忕瓑绛夈傞鍑篓op镄勫懡浠や负q锛埚湪top杩愯屼腑鏁瞦阌涓娆★级銆
濡备綍镆ョ湅鐢佃剳CPU澶勭悊鍣ㄤ釜鏁帮纻
镞㈢劧閮借村埌CPU涓鏁颁简闾f渶灏戝簲璇ユ槸宸ヤ綔绔欐垨钥呮湇锷″櫒(闆嗙兢)win镄勬湁浜鸿翠简鎴戝啀锷犱釜linux镄
涓鏁
cat/proc/cpuinfo|grep"physicalid"|sort|uniq|wc-l
镙稿绩鏁
cat/proc/cpuinfo|grep"cpucores"|uniq
绾跨▼鏁
cat/proc/cpuinfo|grep"processor"|wc-l
④ 如何查看linux系统CPU信息
在Linux中,有许多命令行或基于GUI的工具就能来展示你的CPU硬件的相关具体信息。那么如何查看linux系统CPU信息呢?下面是我收集整理的如何查看linux系统CPU信息,希望对大家有帮助~~
查看linux系统CPU信息的方法
工具/原料
linux系统
方法/步骤
11. /proc/cpuinfo
最简单的方法就是查看 /proc/cpuinfo ,这个虚拟文件展示的是可用CPU硬件的配置。
通过查看这个文件,你能识别出物理处理器数(插槽)、每个CPU核心数、可用的CPU标志寄存器以及其它东西的数量。
12. x86info