How to Check Memory Usage in Linux based Server Cómo Check Uso de la memoria en el servidor basado en Linux
Memory is one of the most critical resource components on a server to ensure that the smooth and fast operation. La memoria es uno de los más importantes componentes de recursos en un servidor para garantizar que el buen y rápido funcionamiento. 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. Por lo tanto, la disponibilidad de suficientes y abundantes tamaño de la memoria física es de vital importancia sobre todo para cualquier servidor, en especial de alta carga de servicio de alojamiento web que también están corriendo servidor de bases de datos como Oracle o MySQL, que es famoso por la memoria 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, incluyendo CentOS que es popular en cPanel y Plesk servidor de alojamiento web, viene con varios comandos y herramientas para comprobar el uso de memoria en el servidor.
free libre
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. libre comando muestra de suma total, libre y utiliza la memoria física (RAM) en el sistema, así como shoing información sobre la memoria compartida, buffers, caché de memoria y espacio de intercambio utilizado por el kernel de Linux.
Syntax of free Sintaxis de la libre
free -[options] libre - [opciones]
Example usage of free Ejemplo de uso libre
free -m free-m
The command will display information about physical memory in MB. El comando mostrará información acerca de la memoria física en 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. El comando activará continuo retraso de votación a 5 segundos y, a continuación, mostrar el estado de la memoria en megabytes por terminal. Any floating point number for delay can be specified. Cualquier número de punto flotante por el retraso puede 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. Igual con "free-m", pero-t interruptor se mostrará una línea que contiene los totales de memoria física y espacio de intercambio.
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 informes informe las estadísticas de la memoria virtual, que tiene información sobre los procesos de intercambio, gratis, de amortiguación y la memoria caché, espacio de paginación, el disco IO actividad, las trampas, las interrupciones, el contexto cambia y la actividad de CPU. With vmstat command, administrators can has instantaneous reports on memory usage. Con vmstat comando, los administradores pueden instantánea tiene informes sobre uso de memoria.
Syntax of vmstat Sintaxis de vmstat
vmstat -[options] [delay count] vmstat - [opciones] [demora count]
Example usage of vmstat Ejemplo de uso de vmstat
vmstat
The command will display report based on averages since last reboot. El comando mostrará informe basado en los promedios desde el último reinicio.
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. El comando piscina promedio los recursos del sistema de nivel de uso por un período de muestreo de 5 segundos en intervalos de 5 segundos, excepto el primer resultado es que los promedios desde el último reinicio.
top superior
top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. comando top muestra dinámica en tiempo real de vista de la gestión tareas gestionadas por el núcleo y el sistema de información en sistema 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. El uso de memoria las estadísticas de arriba incluyen mando en tiempo real en vivo total, utilizada y libre de memoria física y memoria swap con sus buffers de memoria caché y tamaño respectivamente.
Syntax and example usage of top Sintaxis y ejemplo de uso de arriba
top superior
Using top is simple, simply type top at command shell, and constantly update stats page will be shown. Uso de arriba es simple, basta con tipo superior al comando shell, y actualizar constantemente las estadísticas de la página se mostrará.
ps aux ps aux
ps command reports a snapshot on information of the current active processes. ps comando informes una instantánea a información de los procesos se encuentran activos. Advantage of ps command is that system admins will be able to see where the memory is used. Ventaja de comando ps es que los administradores de sistema será capaz de ver donde la memoria se utiliza. ps will show the percentage of memory resource that is used by each process or task running in the system. ps mostrará el porcentaje de recursos de memoria que es utilizada por cada proceso o tarea ejecutando en el sistema. With this command, top memory hogging processes can be identified. Con este comando, arriba hogging los procesos de memoria pueden ser identificados.
Syntax and example of ps aux Sintaxis y ejemplo de ps aux
aux is actually already the options for ps command to see every process on the system. aux es, en realidad ya las opciones de comando ps para ver todos los procesos en el sistema. So the typical command to type the following in the command shell: Así que el típico mando de escribir el siguiente comando en el 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 únicamente los recursos de memoria ocupada por cada categoría de procesos, tales como Apache httpd, mysqld MySQL o Java, utilice el siguiente 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)' | 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. El mencionado todas las formas de comprobar el uso de memoria que funciona en la mayoría de Unix y Linux variante de los sistemas operativos. 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. Sin embargo, si está ejecutando un VPS (Virtual Private Server) o VDS (Virtual Dedicated Server) o Hybrid Server, especialmente aquellos impulsados por Virtuozzo o OpenVZ, por encima de los comandos recuperar datos de la máquina, es decir, todo el servidor virtual medio ambiente se está ejecutando. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file. En estos sistema de virtualización, el uso de memoria información tiene que ser calculado a partir de panel de control o / proc / user_beancounters archivo.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.
Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .
Related Articles Artículos relacionados
- Ubuntu 6.06 Reviews Ubuntu 6,06 Reseñas
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 comentarios
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Open, y Extracto Convertir DAA, la ISO y BIN Archivos en Linux con PowerISO gratuito para Linux
- Cheapest Linux Box Ever Linux más barato nunca
- Find Out Linux Orphan Processes Descubrir los procesos de Linux huérfanas
- Paessler Router Traffic Grapher PRTG 5.3 Review by Computing Paessler Router Traffic Graficador PRTG 5,3 examen de computación
- How to Check if Telnet Is Running on a Server Cómo Telnet Compruebe si está corriendo en un servidor
- Start, Stop and Restart Crond Daemon in Linux Start, stop y restart Crond Daemon en Linux
- Download Free VMWare Server Virtualization Software Descarga gratuita de virtualización de servidores de VMWare Software
- How to Mount USB Disk Drive in UNIX or Linux Cómo montar unidad de disco USB en UNIX o Linux




























September 24th, 2007 15:20 24 de septiembre de 2007 15:20
When you are running top there are three fields related to memory usage. Cuando se está ejecutando parte superior hay tres campos relacionados con el uso de memoria. In order to assay your server memory requirements you have to understand their meaning. Con el fin de su servidor de ensayo de memoria los requisitos que tienen que entender su significado.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes). Lo primero que tienes que saber es que todas las columnas (Virt RES SHR) informe de uso de memoria en 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. Virt la columna (tamaño de la memoria virtual del proceso) se entiende la cantidad de memoria una aplicación particular ha solicitado, también cuenta intercambiada con el disco páginas de memoria. 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. Sin embargo, este campo no significa que este proceso realmente utiliza esa cantidad de memoria, para que lo uses en esta memoria real tiene que ser iniciada por ejemplo utilizando memset. Generally speaking you can disregard this column. En términos generales se puede ignorar esta columna.
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 columna (conjunto residente tamaño, el no cambié la memoria física que una tarea ha usado (en kilobytes)) es el más importante - que en realidad muestra la cantidad de memoria RAM física se asignan a un proceso.
SHR column says how much memory a particular application is sharing with other applications. SHR columna dice la cantidad de memoria una aplicación particular está compartiendo con otras aplicaciones. 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 ejemplo, la mayoría de las aplicaciones en Linux depende de libc, y como cada una de las aplicaciones vínculos con ella y utiliza sus funciones luego esta biblioteca es el espacio de memoria asignadas a todos los procesos al mismo tiempo de conservar la memoria.
Consult with this pages for better understanding: Consulte con esta páginas para una mejor comprensión:
1. http://tldp.org/LDP/tlk/mm/memory.html
2. http://www.ibm.com/developerworks/linux/library/l-mem26/