AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 413593
Accepted
Hafiz Muhammad Shafiq
Hafiz Muhammad Shafiq
Asked: 2017-12-29 21:06:20 +0800 CST2017-12-29 21:06:20 +0800 CST 2017-12-29 21:06:20 +0800 CST

Qual é a diferença entre memória total e livre

  • 772

Eu tenho um sistema de desktop onde o Centos 7 está instalado. Tem 4 núcleos e 12 GB de memória. Para encontrar informações de memória, eu uso free -ho comando. Eu tenho uma confusão.

[user@xyz-hi ~]$ free -h
              total        used        free      shared  buff/cache   available
Mem:            11G        4.6G        231M         94M        6.8G        6.6G
Swap:          3.9G        104M        3.8G

Na coluna total, está dizendo que total em 11GB (isso mesmo), na última coluna disponível, está dizendo que 6,6GB e usado é 4,6G.

Se a memória usada for de 4,6 GB, o restante deve ser de 6,4 GB (11-4,6 = 6,4). Qual é a interpretação correta da saída acima? Qual é a diferença entre memória total, disponível e livre? Estou sem memória no caso acima se precisar de 1 GB a mais para algum novo aplicativo?

linux memory
  • 1 1 respostas
  • 25322 Views

1 respostas

  • Voted
  1. Best Answer
    Hafiz Muhammad Shafiq
    2017-12-30T02:41:06+08:002017-12-30T02:41:06+08:00

    man freecomando resolver o meu problema.

    DESCRIPTION
           free  displays the total amount of free and used physical and swap mem‐
           ory in the system, as well as the buffers and caches used by  the  ker‐
           nel.  The  information  is  gathered by parsing /proc/meminfo. The dis‐
           played columns are:
    
           total  Total installed memory (MemTotal and SwapTotal in /proc/meminfo)
    
           used   Used memory (calculated as total - free - buffers - cache)
    
           free   Unused memory (MemFree and SwapFree in /proc/meminfo)
    
           shared Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available
                  on kernels 2.6.32, displayed as zero if not available)
    
           buffers
                  Memory used by kernel buffers (Buffers in /proc/meminfo)
    
           cache  Memory  used  by  the  page  cache and slabs (Cached and Slab in
                  /proc/meminfo)
    
           buff/cache
                  Sum of buffers and cache
    
           available
                  Estimation of how much memory  is  available  for  starting  new
                  applications,  without swapping. Unlike the data provided by the
                  cache or free fields, this field takes into account  page  cache
                  and also that not all reclaimable memory slabs will be reclaimed
                  due to items being in use (MemAvailable in /proc/meminfo, avail‐
                  able on kernels 3.14, emulated on kernels 2.6.27+, otherwise the
                  same as free)
    
    • 17

relate perguntas

  • Inicie/pare o serviço systemd usando o atalho de teclado [fechado]

  • Necessidade de algumas chamadas de sistema

  • Um processo pode alocar memória cache de forma que o kernel possa aproveitá-la quando necessário?

  • astyle não altera a formatação do arquivo de origem

  • Passe o sistema de arquivos raiz por rótulo para o kernel do Linux

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Matriz JSON para bash variáveis ​​usando jq

    • 4 respostas
  • Marko Smith

    A data pode formatar a hora atual para o fuso horário GMT? [duplicado]

    • 2 respostas
  • Marko Smith

    bash + lê variáveis ​​e valores do arquivo pelo script bash

    • 4 respostas
  • Marko Smith

    Como posso copiar um diretório e renomeá-lo no mesmo comando?

    • 4 respostas
  • Marko Smith

    conexão ssh. Conexão X11 rejeitada devido a autenticação incorreta

    • 3 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Marko Smith

    comando systemctl não funciona no RHEL 6

    • 3 respostas
  • Marko Smith

    rsync porta 22 e 873 uso

    • 2 respostas
  • Marko Smith

    snap /dev/loop em 100% de utilização -- sem espaço livre

    • 1 respostas
  • Marko Smith

    chave de impressão jq e valor para todos no subobjeto

    • 2 respostas
  • Martin Hope
    EHerman Matriz JSON para bash variáveis ​​usando jq 2017-12-31 14:50:58 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Drux A data pode formatar a hora atual para o fuso horário GMT? [duplicado] 2017-12-26 11:35:07 +0800 CST
  • Martin Hope
    AllisonC Como posso copiar um diretório e renomeá-lo no mesmo comando? 2017-12-22 05:28:06 +0800 CST
  • Martin Hope
    Steve Como as permissões de arquivo funcionam para o usuário "root"? 2017-12-22 02:46:01 +0800 CST
  • Martin Hope
    Bagas Sanjaya Por que o Linux usa LF como caractere de nova linha? 2017-12-20 05:48:21 +0800 CST
  • Martin Hope
    Cbhihe Altere o editor padrão para vim para _ sudo systemctl edit [unit-file] _ 2017-12-03 10:11:38 +0800 CST
  • Martin Hope
    showkey Como baixar o pacote não instalá-lo com o comando apt-get? 2017-12-03 02:15:02 +0800 CST
  • Martin Hope
    youxiao Por que os diretórios /home, /usr, /var, etc. têm o mesmo número de inode (2)? 2017-12-02 05:33:41 +0800 CST
  • Martin Hope
    user223600 gpg — o comando list-keys gera uid [ desconhecido ] depois de importar a chave privada para uma instalação limpa 2017-11-26 18:26:02 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve