How to Check Memory Usage in Linux based Server Como se verifique Uso da memória baseado em Linux Servidor
Memory is one of the most critical resource components on a server to ensure that the smooth and fast operation. Memória é um dos componentes mais críticos dos recursos em um servidor para assegurar que o bom e rápido funcionamento. 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. Assim, a disponibilidade de memória física adequada e abundante tamanho é especialmente vital para qualquer servidor, especialmente elevada carga web host, que também estão rodando banco de dados, tais como Oracle ou MySQL, que é famoso por memória intensiva. 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, incluindo CentOS que é popular em Plesk cPanel e hospedagem na web server, vem com vários comandos e instrumentos para verificar a memória utilizada no servidor.
free livre
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. livre montante de comando exibe total, livre e utilizada memória física (RAM) no sistema, bem como informações sobre shoing memória partilhada, buffers, cache de memória e de espaço swap usado pelo kernel do Linux.
Syntax of free Sintaxe de livre
free -[options] livre - [opções]
Example usage of free Exemplo de uso do livre
free -m free-m
The command will display information about physical memory in MB. O comando irá exibir informações sobre MB de memória física.
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. O comando irá ativar contínuo atraso em 5 segundo sondagens à excepção e, em seguida, exibir memória em megabytes em estado terminal. Any floating point number for delay can be specified. Qualquer número em ponto flutuante por atraso pode ser especificado.
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. Mesmo com o "free-m", mas t-switch irá exibir uma linha contendo o total de memória física e espaço 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 relatório memória virtual relatórios estatísticos, que presta informações sobre processos, swap, livre, buffer e memória cache, paginação espaço, disco IO actividade, armadilhas, interrompe, contexto e interruptores CPU atividade. With vmstat command, administrators can has instantaneous reports on memory usage. Com o comando vmstat, os administradores podem ter instantânea relatórios sobre uso de memória.
Syntax of vmstat Sintaxe do vmstat
vmstat -[options] [delay count] vmstat - [opções] [demora contar]
Example usage of vmstat Exemplo de uso do vmstat
vmstat
The command will display report based on averages since last reboot. O comando irá mostrar relatório com base em médias desde a última reinicialização.
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. O comando irá piscina média sistema de utilização dos recursos para um nível amostragem período de 5 segundos no intervalo de 5 segundos, excepto o primeiro resultado é que a média desde a última reinicialização.
top topo
top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. top comando exibe dinâmica em tempo real de vista da executando tarefas gerida pelo kernel do Linux eo sistema de informação no sistema. 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. O uso da memória do comando incluem stats por cima em tempo real vivo total, livre e utilizada memória física e swap memória com seus buffers de memória cache e tamanho, respectivamente.
Syntax and example usage of top Sintaxe e exemplo de uso topo
top topo
Using top is simple, simply type top at command shell, and constantly update stats page will be shown. Usando o topo é simples, basta digitar em cima comando shell, e de actualizar constantemente os stats página será mostrado.
ps aux ps aux
ps command reports a snapshot on information of the current active processes. ps comando relatórios um instantâneo de informações sobre os actuais processos ativos. Advantage of ps command is that system admins will be able to see where the memory is used. Vantagem de comando ps é que admins sistema será capaz de ver onde a memória é usado. ps will show the percentage of memory resource that is used by each process or task running in the system. ps mostrará a porcentagem dos recursos de memória que é utilizada por cada tarefa ou processo em curso no sistema. With this command, top memory hogging processes can be identified. Com esse comando, a top memória hogging processos podem ser identificados.
Syntax and example of ps aux Sintaxe e exemplo de ps aux
aux is actually already the options for ps command to see every process on the system. aux é na verdade já opções para o comando ps para ver todos os processos no sistema. So the typical command to type the following in the command shell: Portanto, o comando típicas a escrever o seguinte comando no shell:
ps aux 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: Para ver apenas os recursos de memória ocupada por cada uma das categorias de processos, como o Apache httpd, MySQL. mysqld ou Java, utilize o seguinte comando:
ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr ps aux | awk '(print $ 4 "\ t" $ 11)' | espécie | 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. A todas as mencionadas formas de utilização deverá verificar memória trabalha a maior parte dos sistemas Unix e Linux variante de sistemas operacionais. 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. No entanto, se você estiver executando um VPS (Virtual Private Server) ou VDS (Virtual Dedicated Server) ou Hybrid Server, especialmente aqueles powered by Virtuozzo ou OpenVZ, os comandos acima irá recuperar os dados da máquina hospedeira, ou seja, a totalidade do servidor virtual meio ambiente está sendo executado. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file. Nestes virtualização sistema, o uso da memória info tem de ser calculada a partir do painel de controle ou / proc / user_beancounters arquivo.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como é" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.
Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .
Related Articles Artigos relacionados
- Ubuntu 6.06 Reviews Ubuntu 6,06 comentários
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Abrir, extrato e converso DAA, ISO e BIN arquivos do Linux com PowerISO Free para Linux
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 comentários
- Cheapest Linux Box Ever O Linux Caixa cada vez mais baratos
- Find Out Linux Orphan Processes Descobrir Linux órfão processos
- Paessler Router Traffic Grapher PRTG 5.3 Review by Computing Paessler Router Traffic GRAPHER PRTG 5,3 revisão pela informática
- How to Check if Telnet Is Running on a Server Como verificar se está rodando em um Telnet Server
- Start, Stop and Restart Crond Daemon in Linux Iniciar, parar e reiniciar Crond Daemon no Linux
- Download Free VMWare Server Virtualization Software Download Free Software de virtualização VMWare Server
- How to Mount USB Disk Drive in UNIX or Linux Como montar a unidade de disco USB em Unix ou Linux











September 24th, 2007 15:20 24 de setembro de 2007 15:20
When you are running top there are three fields related to memory usage. Quando você estiver executando o topo, existem três domínios relacionados com o uso de memória. In order to assay your server memory requirements you have to understand their meaning. A fim de doseamento seu servidor requisitos de memória que você tem que compreender o seu significado.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes). A primeira coisa que você tem que saber é que todas as colunas (praticamente RES SHR) uso da memória do relatório em KB (kilobytes).
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. Praticamente coluna (tamanho da memória virtual do processo) significa a quantidade de memória que um determinado pedido tenha solicitado, também ela é importante para o disco em memória trocados páginas. 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. Mas este campo não significa que esse processo realmente utiliza a mesma quantidade de memória, para usá-la para esta memória real tem de ser iniciado por exemplo utilizando memset. Generally speaking you can disregard this column. De uma maneira geral, pode ignorar esta coluna.
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 coluna (residente definir tamanho, a não troquei memória física que uma tarefa tem usado (em kilobytes)) é a mais importante - ele realmente mostra o quanto física RAM é atribuído a um processo.
SHR column says how much memory a particular application is sharing with other applications. SHR coluna diz que a quantidade de memória que uma determinada aplicação está compartilhando com outras aplicações. 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. Por exemplo, na maioria das aplicações dependem do Linux libc, e as ligações com todas as aplicações que utiliza as suas funções e em seguida esta biblioteca memória espacial é mapeado para todos os processos em simultâneo para conservar a memória.
Consult with this pages for better understanding: Consultar páginas com o presente para melhor entendimento:
1. http://tldp.org/LDP/tlk/mm/memory.html
2. http://www.ibm.com/developerworks/linux/library/l-mem26/