Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Display Number of Processors on Linux Tampilkan Jumlah Prosesor di Linux

If you've just upgraded your Linux box, or you are wondering how many processors a remote server has, there's a quick and dirty command you can use to display the number of processors. Jika Anda baru saja meng-upgrade Linux anda, atau anda bertanya-tanya berapa banyak prosesor server remote, ada yang cepat dan perintah kotor dapat Anda gunakan untuk menampilkan jumlah prosesor.

On Linux, /proc/cpuinfo contains all of the processor information for all current processors in your computer. Di Linux, / proc / cpuinfo berisi semua informasi prosesor untuk semua prosesor saat ini di komputer Anda. This will include the speed, the amount of on-chip cache, processor type, and how many cores. Ini akan mencakup kecepatan, jumlah on-chip cache, tipe prosesor, dan berapa banyak core.

Here's the command: Berikut perintah:

cat /proc/cpuinfo | grep processor | wc -l cat / proc / cpuinfo | grep prosesor | wc-l

The command just looks in the /proc/cpuinfo file, pulls out the number of lines containing the word “processor” and passes them into wc (word count), which returns a count of the CPUs in the system. Perintah hanya tampak di / proc / cpuinfo file, mengeluarkan jumlah baris yang mengandung kata "prosesor" dan melewati mereka ke wc (word count), yang kembali hitungan dari CPU dalam sistem.

Here's what it returned on my remote server: Berikut adalah apa yang kembali pada remote server:

[root@root]# cat /proc/cpuinfo | grep processor | wc -l [root @ root] # cat / proc / cpuinfo | grep prosesor | wc-l

4 4

Note that if you have a dual-core processor, it will return each core as a separate processor. Catatan bahwa jika Anda memiliki prosesor dual-core, hal itu akan kembali masing-masing inti sebagai prosesor yang terpisah. You can look at the full output of cat /proc/cpuinfo to see if the chips are dual-core. Anda dapat melihat output penuh cat / proc / cpuinfo untuk melihat apakah chip dual-core.

This article was originally written on 02/22/07 Tagged with: Artikel ini awalnya ditulis pada 02/22/07 Tagged with: Suse Linux Suse Linux , , Ubuntu Ubuntu

Daily Email Updates Harian Email Pembaharuan

You can get our how-to articles in your inbox each day for free. Anda bisa mendapatkan kita bagaimana-untuk artikel dalam kotak masuk Anda setiap hari secara gratis. Just enter your name and email below: Cukup masukkan nama dan email Anda di bawah ini:


Name: Nama:
Email: Email:

Comments (6) Komentar (6)

  1. Rayz Rayz

    Hi, Hai,
    this will give you the same result and saves you having to type a couple of characters ini akan memberikan Anda hasil yang sama dan menyelamatkan Anda harus mengetikkan beberapa karakter

    grep processor /proc/cpuinfo |wc -l grep processor / proc / cpuinfo | wc-l

  2. Nate Nate

    This will save you a pipe Ini akan menghemat pipa
    grep -c processor /proc/cpuinfo grep-c processor / proc / cpuinfo

  3. Paul Boddie Paul Boddie

    Won't this count CPUs with hyperthreading twice? Tidak akan menghitung ini CPU dengan Hyperthreading dua kali? My computer has one Pentium 4 (Prescott) CPU, but has two processor entries in cpuinfo. Komputer saya memiliki satu Pentium 4 (Prescott) CPU, tetapi memiliki dua prosesor isian di cpuinfo.

  4. odor bau

    Well… Sorry to say that it doesn't work most of the time. Yah ... Maaf untuk mengatakan bahwa tidak bekerja sebagian besar waktu. Beside multithreadin processors, It is common that entry on a single processor has multiple occurence of word “processor” (both in the procesor identifier and model name. Multithreadin samping prosesor, Ini adalah entri yang umum pada satu prosesor memiliki beberapa kemunculan kata "processor" (baik di Procesor pengenal dan nama model.
    On my ancient pemtium M laptop it reports 2 processors because ist modelname is “Intel(R) Pentium(R) M processor 1.73GHz”. Dalam kuno pemtium M laptop itu laporan 2 processors karena ist ModelName adalah "Intel (R) Pentium (R) M Processor 1.73GHz".

    This might help: Ini mungkin membantu:
    grep -c ^processor /proc/cpuinfo grep-c ^ processor / proc / cpuinfo

  5. Ron Ron

    To get the count of physical CPUs, this works by counting the unique physical ids Untuk mendapatkan hitungan CPU fisik, ini bekerja dengan menghitung fisik yang unik ids
    grep “physical id” /proc/cpuinfo |sort -u|wc -l grep "id fisik" / proc / cpuinfo | sort-u | wc-l

  6. Alex Alex

    This comment I wrote may also help you (it's actually for Linux): Komentar ini saya menulis juga dapat membantu Anda (sebenarnya untuk Linux): http://www.howtogeek.com/howto.....ment-64380 http://www.howtogeek.com/howto.....ment-64380


Leave a Comment Tinggalkan Komentar




Leave your Meninggalkan friendly ramah comment here. komentar di sini.

If you have a computer help question, Jika Anda memiliki pertanyaan bantuan komputer, click here to leave it on the forums klik di sini untuk meninggalkannya di forum instead. selain.

Note: Your comment may not show up immediately on the site. Catatan: Komentar anda mungkin tidak muncul segera di situs.

Our Friends Our Friends
Getting Started Persiapan


About How-To Geek Tentang How-To Geek
What Is That Process? Apa Proses Itu?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.