09 BASH – Memoria RAM e SWAP viste da OpenSUSE

19 Febbraio, 2024 (14:55) | BASH, Linux | By: sargonsei

09 BASH – Memoria RAM e SWAP viste da OpenSUSE Tumbleweed

Onde evitare inutili allarmismi, si precisa che le recenti distribuzioni di Linux possono funzionare bene anche in assenza di partizione di SWAP, in quanto sono in grado di creare un apposito file-dati che ne fa le veci.

sudo inxi -Smjxxx # Visualizza Sistema Operativo, Memoria RAM e SWAP
free # Visualizza memoria RAM e SWAP presenti nel Computer
dmesg|egrep RAM # Verifica che la memoria RAM sia vista correttamente dal Sistema Operativo
dmesg|egrep -i swap # Verifica che la partizione SWAP sia stata montata correttamente

Esempi di output:

:~> sudo inxi -Smjxxx # Visualizza Sistema Operativo, Memoria RAM e SWAP
[sudo] password di root:
System:
  Host: 192.168.1.6 Kernel: 6.7.4-1-default arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc
  Console: pty pts/2 DM: SDDM Distro: openSUSE Tumbleweed 20240216
Memory:
  System RAM: total: 16 GiB available: 15.4 GiB used: 2.39 GiB (15.5%) igpu: 60 MiB
  Array-1: capacity: 64 GiB slots: 2 modules: 2 EC: None max-module-size: 32 GiB note: est.
  Device-1: Controller0-ChannelA-DIMM0 type: DDR4 detail: synchronous size: 8 GiB speed:
    spec: 2667 MT/s actual: 2400 MT/s volts: 1.2 width (bits): data: 64 total: 64
    manufacturer: Kimtigo Semiconductor (HK) Limited part-no: KTB900D4S8-8GB serial: 58083B0F
  Device-2: Controller1-ChannelA-DIMM0 type: DDR4 detail: synchronous size: 8 GiB speed:
    spec: 2667 MT/s actual: 2400 MT/s volts: 1.2 width (bits): data: 64 total: 64
    manufacturer: Kimtigo Semiconductor (HK) Limited part-no: KTB900D4S8-8GB serial: 58083B0E
Swap:
  Alert: No swap data was found.
:~>  free # Visualizza memoria RAM e SWAP presenti nel Computer
               total        used        free      shared  buff/cache   available
Mem:        16152928     2484668    12770668      447920     1625596    13668260
Swap:              0           0           0
:~>  dmesg|egrep RAM # Verifica che la memoria RAM sia vista correttamente dal Sistema Operativo
[    0.000000] BIOS-provided physical RAM map:
[    0.036093] RAMDISK: [mem 0x68295000-0x6a039fff]
[    0.191949] e820: reserve RAM buffer [mem 0x0009f000-0x0009ffff]
[    0.191951] e820: reserve RAM buffer [mem 0x6e205000-0x6fffffff]
[    0.191952] e820: reserve RAM buffer [mem 0x6fd36000-0x6fffffff]
[    0.191954] e820: reserve RAM buffer [mem 0x726a3000-0x73ffffff]
[    0.191955] e820: reserve RAM buffer [mem 0x76000000-0x77ffffff]
[    0.191957] e820: reserve RAM buffer [mem 0x47fc00000-0x47fffffff]
[    0.452349] systemd[1]: systemd 254.8+suse.22.g67a5ac1043 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA -SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON -UTMP +SYSVINIT default-hierarchy=unified)
[    3.516660] systemd[1]: systemd 254.8+suse.22.g67a5ac1043 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA -SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON -UTMP +SYSVINIT default-hierarchy=unified)
[    3.609472] scsi 3:0:0:0: CD-ROM            HL-DT-ST DVDRAM GP08NU20  1.01 PQ: 0 ANSI: 0
:~>  dmesg|egrep -i swap # Verifica che la partizione SWAP sia stata montata correttamente
[    0.074835] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.567094] systemd[1]: Reached target Swaps.
[    4.188219] systemd[1]: Reached target Swaps.
:~>