How to Check Memory Usage in Linux based Server Bagaimana Periksa Memory Usage di Server berbasis Linux
Memory is one of the most critical resource components on a server to ensure that the smooth and fast operation. Memori merupakan salah satu komponen sumber daya yang paling penting pada server untuk memastikan bahwa operasi yang mulus dan cepat. Thus, the availability of adequate and abundant physical memory size is vital especially for any server, especially high load web host that are also running database server such as Oracle or MySQL, which is famous for memory intensive. Dengan demikian, ketersediaan yang memadai dan berlimpah ukuran memori fisik sangat penting terutama untuk server apapun, khususnya web host beban tinggi yang juga menjalankan server database seperti Oracle atau MySQL, yang terkenal karena intensif memori. Linux, including CentOS which is popular on cPanel and Plesk web hosting server, comes with several commands and tools to check memory usage on server. Linux, termasuk CentOS yang populer di cPanel dan Plesk web hosting server, dilengkapi dengan beberapa perintah dan alat-alat untuk memeriksa penggunaan memori di server.
free bebas
free command displays amount of total, free and used physical memory (RAM) in the system, as well as shoing information on shared memory, buffers, cached memory and swap space used by the Linux kernel. free perintah menampilkan jumlah total, bebas, dan menggunakan memori fisik (RAM) dalam sistem, serta informasi tentang shoing shared memory, buffer, cache memori dan swap digunakan oleh kernel Linux.
Syntax of free Sintaks bebas
free -[options] free - [options]
Example usage of free Contoh penggunaan bebas
free -m free-m
The command will display information about physical memory in MB. Perintah ini akan menampilkan informasi tentang memori fisik di MB.
free -m -s 5 free-m-s 5
The command will activate continuous polling delay at 5 seconds apart, and then display memory status in megabytes on terminal. Perintah tersebut akan mengaktifkan terus-menerus menunda pemungutan suara pada 5 detik terpisah, dan kemudian menampilkan status memori dalam megabyte pada terminal. Any floating point number for delay can be specified. Setiap floating point nomor penundaan dapat ditetapkan.
free -t -m free-t-m
Same with “free -m”, but -t switch will display a line containing the totals of physical memory and swap space. Sama dengan "free-m", tapi-t switch akan menampilkan baris yang berisi total memori fisik dan swap.
vmstat vmstat
vmstat reports report virtual memory statistics, which has information about processes, swap, free, buffer and cache memory, paging space, disk IO activity, traps, interrupts, context switches and CPU activity. vmstat laporan laporan statistik virtual memory, yang mempunyai informasi tentang proses-proses, swap, gratis, buffer dan cache memory, paging space, disk IO aktivitas, perangkap, potong, konteks switch dan aktivitas CPU. With vmstat command, administrators can has instantaneous reports on memory usage. Dengan perintah vmstat, administrator dapat memiliki laporan sesaat pada penggunaan memori.
Syntax of vmstat Sintaks vmstat
vmstat -[options] [delay count] vmstat - [pilihan] [penundaan count]
Example usage of vmstat Contoh penggunaan vmstat
vmstat vmstat
The command will display report based on averages since last reboot. Perintah akan menampilkan laporan berdasarkan rata-rata sejak terakhir reboot.
vmstat 5 vmstat 5
The command will pool average system resources usage level for a sampling period of 5 seconds at interval of 5 seconds, except the first result that is averages since the last reboot. Perintah akan renang rata-rata tingkat penggunaan sumber daya sistem untuk periode sampling 5 detik pada interval 5 detik, kecuali hasil pertama yang rata-rata sejak reboot terakhir.
top puncak
top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. atas perintah menampilkan real-time dinamis pandangan tugas-tugas yang sedang berjalan yang dikelola oleh kernel dan sistem informasi di sistem Linux. The memory usage stats by top command include real-time live total, used and free physical memory and swap memory with their buffers and cached memory size respectively. Statistik penggunaan memori oleh perintah atas termasuk real-time hidup total, digunakan dan gratis memori fisik dan swap memori dengan buffer dan ukuran memori cache masing-masing.
Syntax and example usage of top Sintaks dan contoh penggunaan atas
top puncak
Using top is simple, simply type top at command shell, and constantly update stats page will be shown. Menggunakan atas adalah sederhana, cukup ketik perintah top pada shell, dan terus-menerus memperbarui halaman statistik akan ditampilkan.
ps aux id aux
ps command reports a snapshot on information of the current active processes. laporan perintah id snapshot informasi dari proses yang aktif saat ini. Advantage of ps command is that system admins will be able to see where the memory is used. Keuntungan dari perintah id admin sistem itu akan dapat melihat di mana memori digunakan. ps will show the percentage of memory resource that is used by each process or task running in the system. id akan menunjukkan persentase sumber daya memori yang digunakan oleh setiap proses atau tugas berjalan di sistem. With this command, top memory hogging processes can be identified. Dengan perintah ini, atas belitan memori proses dapat diidentifikasi.
Syntax and example of ps aux Sintaks dan contoh id aux
aux is actually already the options for ps command to see every process on the system. aux sebenarnya sudah pilihan untuk perintah id untuk melihat setiap proses pada sistem. So the typical command to type the following in the command shell: Jadi perintah khas mengetikkan perintah berikut di shell:
ps aux
To see only the memory resources occupied by each category of processes, such as Apache httpd, MySQL mysqld or Java, use the following command: Untuk hanya melihat sumber daya memori ditempati oleh masing-masing kategori proses, seperti Apache httpd, MySQL mysqld atau Java, gunakan perintah berikut:
ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr
The all mentioned ways of check memory usage should works on most Unix and Linux variant of operating systems. Semua disebutkan cara memeriksa penggunaan memori harus bekerja pada sebagian besar varian Unix dan Linux dari sistem operasi. However, if you're running a VPS (Virtual Private Server) or VDS (Virtual Dedicated Server) or Hybrid Server, especially those powered by Virtuozzo or OpenVZ, the above commands will retrieve data from the host machine, ie the entire server the virtual environment is running on. Namun, jika Anda menjalankan VPS (Virtual Private Server) atau VDS (Virtual Dedicated Server) atau Hybrid Server, terutama yang didukung oleh Virtuozzo atau OpenVZ, kedua perintah di atas akan mengambil data dari host mesin, yaitu seluruh server virtual lingkungan yang berjalan di. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file. Dalam virtualisasi sistem, penggunaan memori info harus dihitung dari panel kontrol atau / proc / user_beancounters file.
IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman ini adalah mesin diterjemahkan dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Terjemahan mesin mungkin sulit untuk mengerti. Please refer to Silakan merujuk ke original English article artikel asli bahasa Inggris whenever possible. bila memungkinkan.
Related Articles Artikel Terkait
- Get Triggered with High Memory Usage via Usage Monitor Dapatkan Dipicu dengan High Memory Usage melalui Usage Monitor
- Optimizing Windows Memory Usage with Minimem Mengoptimalkan Windows Memory Usage dengan Minimem
- Lower, Reduce and Optimize Windows RAM Memory Usage with CleanMem Rendah, Mengurangi dan Optimalkan Windows RAM Memory Usage dengan CleanMem
- How to Check if Telnet Is Running on a Server Bagaimana Periksa apakah Berjalan pada Telnet Apakah Server
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Terbuka, Extract dan Konversi DAA, ISO dan BIN File di Linux dengan Free PowerISO untuk Linux
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 Ulasan
- Check Your Disk! Periksa Disk Anda! Provides Statistical Information of Hard Disk Usage Memberikan Informasi Statistik di Hard Disk Usage
- Optimize SQL Server 2000, 2005 or 2008 in Large RAM System by Locking Pages in Memory and AWE Optimalkan SQL Server 2000, 2005 atau 2008 di RAM Besar Sistem oleh Mengunci Artikel dalam memori dan AWE
- How to Find and Check Number of Connections to a Server Cara Cari dan Cek Jumlah Koneksi ke Server










































February 23rd, 2009 21:50 23 Februari 2009 21:50
annoying javascript! menjengkelkan javascript!
pgup moves you to bottom of page. PgUp menggerakkan Anda ke bagian bawah halaman. can't navigate tidak dapat menavigasi
September 24th, 2007 15:20 24 September 2007 15:20
When you are running top there are three fields related to memory usage. Ketika Anda menjalankan atas ada tiga bidang yang berkaitan dengan penggunaan memori. In order to assay your server memory requirements you have to understand their meaning. Dalam rangka assay kebutuhan memory server Anda, Anda harus memahami maknanya.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes). Hal pertama yang Anda harus ketahui adalah bahwa semua kolom (RES Virt shr) melaporkan penggunaan memori di KB (kilobyte).
VIRT column (virtual memory size of the process) means how much memory a particular application has requested, also it counts swapped to the disk memory pages. Virt kolom (ukuran memori virtual dari proses) berarti berapa banyak memori aplikasi tertentu telah meminta, juga hal menghitung bertukar ke halaman memori disk. But this field does NOT mean that this process actually uses that amount of memory, to use it for real this memory has to be initiated for example using memset. Tapi bidang ini TIDAK berarti bahwa proses ini benar-benar menggunakan jumlah memori, menggunakannya untuk nyata memori ini harus dimulai misalnya menggunakan memset. Generally speaking you can disregard this column. Secara umum Anda dapat mengabaikan kolom ini.
RES column (resident set size, the non-swapped physical memory that a task has used (in kiloBytes)) is the most important one – it actually shows how much physical RAM is allocated for a process. RES kolom (penduduk mengatur ukuran, bertukar non-memori fisik bahwa tugas yang telah digunakan (dalam kilobyte)) adalah yang paling penting - itu benar-benar menunjukkan berapa banyak RAM yang dialokasikan untuk suatu proses.
SHR column says how much memory a particular application is sharing with other applications. Shr kolom mengatakan berapa banyak memori aplikasi tertentu berbagi dengan aplikasi lain. Eg, most applications in Linux depend on libc, and as every application links with it and uses its functions then this library memory space is mapped to all process simultaneously to conserve memory. Misalnya, sebagian besar aplikasi di Linux tergantung pada libc, dan karena setiap aplikasi dan link dengan menggunakan fungsi-fungsinya maka ruang memori perpustakaan ini dipetakan ke seluruh proses secara bersamaan untuk menghemat memori.
Consult with this pages for better understanding: Berkonsultasi dengan halaman ini untuk pemahaman yang lebih baik:
1. 1. http://tldp.org/LDP/tlk/mm/memory.html http://tldp.org/LDP/tlk/mm/memory.html
2. 2. http://www.ibm.com/developerworks/linux/library/l-mem26/ http://www.ibm.com/developerworks/linux/library/l-mem26/