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 / ubuntu / Perguntas / 1361138
Accepted
user1041353
user1041353
Asked: 2021-09-01 05:55:31 +0800 CST2021-09-01 05:55:31 +0800 CST 2021-09-01 05:55:31 +0800 CST

O Ubuntu 21.04 congela

  • 772

Meu Ubuntu 21.04 funciona bem após cada inicialização e reinicialização. No entanto, após 3-4 horas, ele “congela”. Nada ajuda, mas forçar o reinício. Como evitar este último?

O Terminal executa:

<free -h
              total        used        free      shared  buff/cache   available
Mem:          3.5Gi       2.2Gi       243Mi       278Mi       1.1Gi       832Mi
Swap:         2.0Gi        17Mi       2.0Gi

vm.swappiness = 60

Filename                Type        Size    Used    Priority
/swapfile                               file        2097148 17772   -2

top - 09:32:34 up 26 min,  1 user,  load average: 0.26, 0.59, 1.18
Tasks: 203 total,   3 running, 200 sleeping,   0 stopped,   0 zombie
%Cpu(s): 42.9 us,  0.0 sy,  0.0 ni, 57.1 id,  0.0 wa,  0.0 hi,  0.0 si,  0top - 09:33:54 up 27 min,  1 user,  load average: 0.72, 0.73, 1.18
Tasks: 203 total,   3 running, 200 sleeping,   0 stopped,   0 zombie
%Cpu(s): 25.0 us, 18.8 sy,  0.0 ni, 56.2 id,  0.0 wa,  0.0 hi,  0.0 si, top - 09:33:54 up 27 min,  1 user,  load average: 0.72, 0.73, 1.18
Tasks: 203 total,   4 running, 199 sleeping,   0 stopped,   0 zombie
%Cpu(s): 40.0 us, 20.0 sy,  0.0 ni, 40.0 id,  0.0 wa,  0.0 hi,  0.0 si,top - 09:33:54 up 27 min,  1 user,  load average: 0.72, 0.73, 1.18
Tasks: 203 total,   2 running, 201 sleeping,   0 stopped,   0 zombie
%Cpu(s): 33.3 us, 33.3 sy,  0.0 ni, 33.3 id,  0.0 wa,  0.0 hi,  0.0 si,top - 09:33:54 up 27 min,  1 user,  load average: 0.72, 0.73, 1.18
Tasks: 203 total,   5 running, 198 sleeping,   0 stopped,   0 zombie
%Cpu(s): 28.6 us, 42.9 sy,  0.0 ni, 28.6 id,  0.0 wa,  0.0 hi,  0.0 si,
MiB Mem :   3623.3 total,    139.9 free,   2286.0 used,   1197.4 buff/c
MiB Swap:   2048.0 total,   2029.4 free,     18.6 used.    822.0 avail> 


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=28539ebd-a6e3-4fa7-8dcc-8bdc31b0f505 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw 

Para começar, o material mais valioso deve estar em um disco rígido (por exemplo, Transcend) e corrigido diariamente (com a Internet desligada). Mantenha a ferramenta de instalação pronta também. Quando o congelamento é ruim e o conselho não está em lugar algum, force o desligamento, conecte a ferramenta de instalação, inicialize enquanto pressiona F2. Em um menu de inicialização, escolha a ferramenta acima e reinstale o sistema. Prefira a versão LTS. Mente Livepatch. Isso funcionou no meu caso.

restart
  • 1 1 respostas
  • 789 Views

1 respostas

  • Voted
  1. Best Answer
    heynnema
    2021-09-02T05:37:56+08:002021-09-02T05:37:56+08:00

    Você não tem RAM suficiente ou swap suficiente.

                  total        used        free      shared  buff/cache   available
    Mem:          3.5Gi       2.2Gi       243Mi       278Mi       1.1Gi       832Mi
    Swap:         2.0Gi        17Mi       2.0Gi
    

    Aumentaremos sua troca de 2G para 4G e veremos se isso ajuda...

    Nota : O uso incorreto dos comandos rme ddpode causar perda de dados. Sugira copiar/colar.

    No terminal...

    sudo swapoff -a           # turn off swap
    sudo rm -i /swapfile      # remove old /swapfile
    
    sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
    
    sudo chmod 600 /swapfile  # set proper file protections
    sudo mkswap /swapfile     # init /swapfile
    sudo swapon /swapfile     # turn on swap
    free -h                   # confirm 4G RAM and 4G swap
    

    Edite /etc/fstab, usando sudo -H gedit /etc/fstabou sudo pico /etc/fstab.

    Confirme esta linha /swapfile em /etc/fstab... e não confirme nenhuma outra linha "swap"... use ESPAÇOS nesta linha... confirme NO TABS...

    /swapfile  none  swap  sw  0  0
    

    reboot                    # reboot and verify operation
    

    Atualização nº 1:

    Reinstalei o Ubuntu para corrigir o problema.

    • 1

relate perguntas

  • Como faço para alterar o nome do host sem reiniciar?

Sidebar

Stats

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

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

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