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