Dicas de Linux - Identificação da maquina

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar

Nesta página estão indicados alguns comandos úteis para a identificação de uma máquina e seu sistema operacional

Nome e características do SO

cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.13 (stretch)
Release:	9.13
Codename:	stretch
hostnamectl
   Static hostname: sj-lin-des2-744926
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: xxxxxxxxxxxx
           Boot ID: xxxxxxxxxxxx
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-18-amd64
      Architecture: x86-64
uname -a
Linux <hostname> 4.9.0-18-amd64 #1 SMP Debian 4.9.303-1 (2022-03-07) x86_64 GNU/Linux
inxi -S
apt install inxi
inxi -S
System:    Host: <hostname> Kernel: 4.9.0-18-amd64 x86_64 (64 bit) Desktop: MATE 1.16.2
           Distro: Debian GNU/Linux 9 (stretch)

Características da máquina

Resumo de várias características pode ser obtido com:

inxi -F
apt install inxi
inxi -F
System:    Host: <hostname> Kernel: 4.9.0-18-amd64 x86_64 (64 bit)
           Desktop: MATE 1.16.2  Distro: Debian GNU/Linux 9 (stretch)
Machine:   Device: desktop System: Dell product: OptiPlex 3020M v: 00
           Mobo: Dell model: 0VRWRC v: A01 BIOS: Dell v: A14 date: 11/14/2018
CPU:       Quad core Intel Core i5-4590T (-MCP-) cache: 6144 KB 
           clock speeds: max: 3000 MHz 1: 2027 MHz 2: 2000 MHz 3: 2200 MHz
           4: 2335 MHz
Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller
           Display Server: X.Org 1.19.2 drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz, 1920x1080@60.00hz
           GLX Renderer: Mesa DRI Intel Haswell Desktop
           GLX Version: 3.0 Mesa 13.0.6
Audio:     Card-1 Intel 8 Series/C220 Series High Definition Audio Controller
           driver: snd_hda_intel
           Card-2 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.9.0-18-amd64
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: eth0 state: up speed: 1000 Mbps duplex: full
           mac: <mac_address>
Drives:    HDD Total Size: 1000.2GB (19.7% used)
           ID-1: /dev/sda model: TOSHIBA_MQ01ABD1 size: 1000.2GB
Partition: ID-1: / size: 399G used: 184G (49%) fs: ext4 dev: /dev/sda4
Sensors:   System Temperatures: cpu: 50.0C mobo: 27.8C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 228 Uptime: 2:47 Memory: 2340.4/15969.4MB
           Client: Shell (bash) inxi: 2.3.5 


dmidecode -t 1
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: Dell Inc.
	Product Name: OptiPlex 3020M
	Version: 00
	Serial Number: xxxxx
	UUID: xxxxxxxx
	Wake-up Type: Power Switch
	SKU Number: xxxx
	Family: Not Specified
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +80.0°C)
temp2:        +29.8°C  (crit = +80.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +48.0°C  (high = +69.0°C, crit = +75.0°C)
Core 0:         +48.0°C  (high = +69.0°C, crit = +75.0°C)
Core 1:         +45.0°C  (high = +69.0°C, crit = +75.0°C)
Core 2:         +47.0°C  (high = +69.0°C, crit = +75.0°C)
Core 3:         +43.0°C  (high = +69.0°C, crit = +75.0°C)
lsmod
Module                  Size  Used by
fuse                   98304  1
btrfs                1069056  0
xor                    24576  1 btrfs
raid6_pq              110592  1 btrfs
ufs                    73728  0
qnx4                   16384  0
hfsplus               102400  0
hfs                    57344  0
minix                  40960  0
ntfs                  102400  0
vfat                   20480  0
msdos                  20480  0
fat                    69632  2 msdos,vfat
jfs                   176128  0
xfs                  1228800  0
libcrc32c              16384  1 xfs
dm_mod                118784  0
nls_utf8               16384  4
cifs                  684032  5
sha256_ssse3           32768  0
cmac                   16384  0
md4                    16384  0
des_generic            24576  0
arc4                   16384  0
dns_resolver           16384  1 cifs
fscache                61440  1 cifs
cpufreq_userspace      16384  0
cpufreq_powersave      16384  0
cpufreq_conservative    16384  0
intel_rapl             20480  0
dell_wmi               16384  0
sparse_keymap          16384  1 dell_wmi
dell_smbios            16384  1 dell_wmi
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
iTCO_wdt               16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
coretemp               16384  0
evdev                  24576  10
kvm_intel             200704  0
kvm                   610304  1 kvm_intel
snd_hda_codec_hdmi     49152  1
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  0
snd_hda_codec_realtek    90112  1
snd_hda_codec_generic    73728  1 snd_hda_codec_realtek
snd_hda_intel          36864  4
crc32_pclmul           16384  0
snd_hda_codec         135168  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
dcdbas                 16384  1 dell_smbios
snd_hda_core           90112  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
ghash_clmulni_intel    16384  0
i915                 1265664  14
drm_kms_helper        155648  1 i915
drm                   360448  7 i915,drm_kms_helper
snd_hwdep              16384  1 snd_hda_codec
mei_me                 36864  0
intel_cstate           16384  0
snd_pcm               110592  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_timer              32768  1 snd_pcm
snd                    86016  16 snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek,snd_pcm
wmi                    16384  1 dell_wmi
lpc_ich                24576  0
mfd_core               16384  1 lpc_ich
intel_uncore          118784  0
intel_rapl_perf        16384  0
mei                   102400  1 mei_me
serio_raw              16384  0
shpchp                 36864  0
sg                     32768  0
soundcore              16384  1 snd
i2c_algo_bit           16384  1 i915
video                  40960  2 dell_wmi,i915
button                 16384  1 i915
binfmt_misc            20480  1
squashfs               53248  5
loop                   28672  10
sunrpc                344064  1
parport_pc             28672  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
ip_tables              24576  0
x_tables               36864  1 ip_tables
autofs4                40960  2
ext4                  593920  1
crc16                  16384  1 ext4
jbd2                  110592  1 ext4
crc32c_generic         16384  0
fscrypto               28672  1 ext4
ecb                    16384  0
mbcache                16384  2 ext4
hid_generic            16384  0
usbhid                 53248  0
hid                   122880  2 hid_generic,usbhid
sd_mod                 49152  2
crc32c_intel           24576  4
psmouse               135168  0
aesni_intel           167936  0
aes_x86_64             20480  1 aesni_intel
ahci                   40960  1
glue_helper            16384  1 aesni_intel
xhci_pci               16384  0
lrw                    16384  1 aesni_intel
gf128mul               16384  1 lrw
libahci                32768  1 ahci
ablk_helper            16384  1 aesni_intel
cryptd                 24576  3 ablk_helper,ghash_clmulni_intel,aesni_intel
i2c_i801               24576  0
i2c_smbus              16384  1 i2c_i801
libata                249856  2 ahci,libahci
ehci_pci               16384  0
ehci_hcd               81920  1 ehci_pci
scsi_mod              225280  3 sd_mod,libata,sg
xhci_hcd              192512  1 xhci_pci
r8169                  86016  0
mii                    16384  1 r8169
usbcore               262144  5 usbhid,ehci_hcd,xhci_pci,xhci_hcd,ehci_pci
usb_common             16384  1 usbcore
fan                    16384  0
thermal                20480  0
modinfo
modinfo coretemp
filename:       /lib/modules/4.9.0-18-amd64/kernel/drivers/hwmon/coretemp.ko
license:        GPL
description:    Intel Core temperature monitor
author:         Rudolf Marek <r.marek@assembler.cz>
alias:          cpu:type:x86,ven0000fam*mod*:feature:*01C0*
depends:        
intree:         Y
vermagic:       4.9.0-18-amd64 SMP mod_unload modversions 
parm:           tjmax:TjMax value in degrees Celsius (int)

Dispositivos conectados a maquina

lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 003 Device 003: ID 413c:2107 Dell Computer Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -vs 003:003 | grep iProduct
 iProduct                2 Dell USB Entry Keyboard
lsusb -vs 003:002 | grep iProduct
 iProduct                2 USB Optical Mouse


lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation C220 Series Chipset Family H81 Express LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
lspci -vs 02:00
 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit 
 Ethernet Controller (rev 0c)
	Subsystem: Dell RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
	Flags: bus master, fast devsel, latency 0, IRQ 26
	I/O ports at e000 [size=256]
	Memory at f7c00000 (64-bit, non-prefetchable) [size=4K]
	Memory at f0000000 (64-bit, prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Endpoint, MSI 01
	Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
	Capabilities: [d0] Vital Product Data
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
	Capabilities: [170] Latency Tolerance Reporting
	Kernel driver in use: r8169
	Kernel modules: r8169

Use de memória em disco

df (df -H)
Sist. Arq.                   Tam. Usado Disp. Uso% Montado em
udev                         8,4G     0  8,4G   0% /dev
tmpfs                        1,7G   13M  1,7G   1% /run
/dev/sda4                    428G  197G  213G  49% /
tmpfs                        8,4G  109M  8,3G   2% /dev/shm
tmpfs                        5,3M  4,1k  5,3M   1% /run/lock
tmpfs                        8,4G     0  8,4G   0% /sys/fs/cgroup
tmpfs                        1,7G   29k  1,7G   1% /run/user/35092
...
fdisk -l
Disco /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 4096 bytes
Tamanho E/S (mínimo/ótimo): 4096 bytes / 4096 bytes
Tipo de rótulo do disco: dos
Identificador do disco: xxxxx

Dispositivo Inicializar     Início        Fim    Setores Tamanho Id Tipo
/dev/sda1   *                 2048    1543167    1541120  752,5M  7 HPFS/NTFS/exFAT
/dev/sda2                  1543168 1092876799 1091333632  520,4G  7 HPFS/NTFS/exFAT
/dev/sda3               1092876800 1103313407   10436608      5G  b FAT32 W95
/dev/sda4               1103313408 1953522687  850209280  405,4G 83 Linux
...