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 .



One Response to “How to Check Memory Usage in Linux based Server” Uma resposta a "Como se verifique Uso da memória baseado em Linux Server"

  1. Artem S. Tashkinov Artem S. Tashkinov
    September 24th, 2007 15:20 24 de setembro de 2007 15:20
    1

    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/

Leave a Reply Deixe uma resposta

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Você pode usar estas tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Subscreva sem comentar


Custom Search

New Articles Novos Artigos

Incoming Search Terms for the Article Incoming Termos de pesquisa para o artigo

linux memory usage uso da memória do Linux - -- linux memory stats Linux memória stats - -- CentOS memory usage CentOS memória - -- linux show memory Linux mostram memória - -- linux memory size Linux memória tamanho - -- Linux memory status Linux memória status - -- linux top memory Linux top memória - -- ubuntu show memory Ubuntu mostrar memória - -- linux check memory usage Linux verificar memória - -- linux check resources Linux verificar recursos - -- ubuntu show memory usage Ubuntu mostrar memória - -- ubuntu check memory Ubuntu verificar memória - -- linux check memory Linux verificar memória - -- memory usage linux uso da memória do Linux - -- linux memory usage report Linux uso da memória do relatório - -- ubuntu check memory usage Ubuntu verificar memória - -- linux check memory status Linux verificar memória status - -- show memory linux mostrar memória Linux - -- checking memory usage on linux verificação de memória em uso Linux - -- top command memory usage top uso da memória do comando - -- how to check memory in linux verificar a forma de memória no linux - -- linux real memory usage Linux verdadeira memória - -- plesk memory usage plesk memória - -- linux show swap usage Linux demonstrar o uso da swap - -- unix memory usage uso da memória do Unix - -- ubuntu server memory usage Ubuntu uso da memória do servidor - -- linux check processes Linux verificar processos - -- linux physical memory usage Linux memória física uso - -- linux memory statistics Linux memória estatísticas - -- unix memory status Unix memória status - -- how to check memory status in linux estado para verificar a forma como memória no linux - -- Linux ps show memory Linux PS mostrar memória - -- linux check resource usage Linux verificar o uso de recursos - -- linux show physical memory Linux mostram memória física - -- check memory usage ubuntu verificar uso da memória do Ubuntu - -- linux check process Linux check processo - -- check memory usage linux verificar uso da memória do Linux - -- ps show memory usage PS mostrar memória - -- linux memory stat Linux memória stat - -- check memory status in linux verificar status de memória no Linux - -- checking memory in unix verificação de memória em Unix - -- top memory linux top memória Linux - -- ps show memory PS mostrar memória - -- linux top memory Linux top memória - -- show physical memory linux mostrar memória física Linux - -- show memory in linux mostrar memória em Linux - -- checking memory in linux verificação de memória em Linux - -- Linux ps memory size Linux PS memória tamanho - -- all todos - -- unix ps show memory usage PS revelam uso da memória do Unix - -- linux check memory process Linux verificar memória processo - -- ps display memory usage PS uso da memória do visor - -- show memory usage ubuntu mostrar uso da memória do Ubuntu - -- top virt column top praticamente coluna - -- linux application memory usage Linux uso da memória do aplicativo - -- linux memory info Linux info de memória - -- check memory on linux verificação de memória em Linux - -- linux display memory size Linux exibição memória tamanho - -- linux check memory size Linux verificar memória tamanho - -- linux top virt Linux praticamente topo - -- linux show memory status Linux mostram memória status - -- show memory usage linux mostrar uso da memória do Linux - -- linux show memory size Linux mostram memória tamanho - -- check memory linux verificar memória Linux - -- linux+check process+memory + + linux verificar processo de memória - -- linux show memory usage Linux uso da memória do show - -- top command virt top comando praticamente - -- check memory in linux verificação de memória em Linux - -- linux memory report Linux memória relatório - -- linux ps memory usage PS uso da memória do Linux - -- ubuntu check ram size Ubuntu verificar Ram tamanho - -- checking the amount of memory on a Linux server verificar a quantidade de memória em um servidor Linux - -- linux command to check memory status linux comando para verificar a memória status - -- check ram on linux verificar ram em Linux - -- linux report memory usage Linux uso da memória do relatório - --