Linux: Cum fac...?

miahi

Wizzard
Sugar daddy
Joined
Aug 1, 2004
Messages
8,405

In this regularly but rarely updated article, which is without doubt the most comprehensive list of Linux distributions' problems on the entire Internet, we only discuss their main problems and shortcomings (which may be the reason why some people say Linux distros are not ready for the desktop) while everyone should keep in mind that there are areas where Linux has excelled other OSes: excellent package management within one distro, multiple platforms and architectures support out of the box, usually excellent stability, no widely circulating viruses or malware, complete system reinstallation is almost never required, besides, Linux is extremely customizable, easily scripted and it's free as in beer.
 

Marius '95

Membru Senior
Sugar daddy
Joined
Nov 13, 2005
Messages
5,020
Linux pe diverse hardware-uri.
Cum fac sa obtin un raport despre hardware-ul sistemului: device-uri, drivere in uz, porturi, USB tree, grafica, senzorii de temperatura, etc., un fel de Device Manager din Windows, in modul "Devices by connection" care sa arate ce componente sunt in sistem si cum sunt conectate?

Stiu ca exista lspci, lsusb, lsi2c, blkid, etc. Dar as vrea ceva care sa le uneasca pe toate intr-un singur loc.
Mi-ar fi util sa afiseze si capabilitatile procesorului: accelerare crypto, codec-uri, RNG, etc.
 

miahi

Wizzard
Sugar daddy
Joined
Aug 1, 2004
Messages
8,405
Probabil hwinfo e cel mai apropiat de ce vrei, cu versiunea --short obții câte ceva digerabil, iar dacă vrei chestii complexe se poate și asta
Code:
  processor     : 1
  vendor_id     : GenuineIntel
  cpu family    : 6
  model         : 158
  model name    : Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  stepping      : 13
  microcode     : 0xde
  cpu MHz               : 2304.002
  cache size    : 16384 KB
  physical id   : 0
  siblings      : 4
  core id               : 1
  cpu cores     : 4
  apicid                : 1
  initial apicid        : 1
  fpu           : yes
  fpu_exception : yes
  cpuid level   : 22
  wp            : yes
  flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqd
q ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap x
saveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities
  bogomips      : 4608.00
  clflush size  : 64
  cache_alignment       : 64
  address sizes : 42 bits physical, 48 bits virtual

ai și un fel de tree pe ioports
Code:
    0376-0376 : 0000:00:07.1
      0376-0376 : ata_piix
    03c0-03df : vga+
    03f6-03f6 : 0000:00:07.1
      03f6-03f6 : ata_piix
    04d0-04d1 : PNP0001:00
    0cf0-0cf1 : pnp 00:00
  0cf8-0cff : PCI conf1
  0d00-feff : PCI Bus 0000:00
    1000-103f : 0000:00:07.3
      1000-1003 : ACPI PM1a_EVT_BLK
      1004-1005 : ACPI PM1a_CNT_BLK
      1008-100b : ACPI PM_TMR
      100c-100f : ACPI GPE0_BLK
      1010-1015 : ACPI CPU throttle
    1040-104f : 0000:00:07.3
      1040-104f : pnp 00:00
    1060-106f : 0000:00:07.1
      1060-106f : ata_piix
 

Thor

Membru Junior
Sugar daddy
Joined
Dec 6, 2004
Messages
2,036
Încearcă și inxi:
❯ inxi -C -x
CPU:
Info: 6-Core model: Intel Core i7-8850H bits: 64 type: MT MCP
arch: Kaby Lake note: check rev: A L2 cache: 9 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 62431
Speed: 800 MHz min/max: 800/4300 MHz Core speeds (MHz): 1: 800 2: 800
3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800

Modulele de kernel le vezi cu lsmod.
 

Marius '95

Membru Senior
Sugar daddy
Joined
Nov 13, 2005
Messages
5,020
Construiesc un OpenWRT din git/master branch. OpenWRT are "make menuconfig" pentru selectat componentele imaginii, inclusiv modulele kernelului, dar mai are si "make kernel_menuconfig" care configureaza kernelul direct. Interactiunea intre cele doua cam lasa de dorit. De obicei nu pot selecta acelasi driver in ambele parti, ca nu se mai compileaza, iar in anumite situatii, daca selectez din kernel_menuconfig, nu din menuconfig-ul openwrt, driverul "se pierde" pe drum si nu mai ajunge in imaginea OpenWRT finala.

Cum fac sa verific daca kernelul contine sau nu un anumit driver?
M-am gandit la /proc/config.gz, dar parca as prefera ceva mai "hardcode", sa-i verific prezenta efectiv.

PS: este vorba de driver inclus in kernel, nu modul. (BTW, menuconfig nu permite includerea driverului in kernel; bifatul cu steluta inseamna sa includa modulul in imagine.)
 

Marius '95

Membru Senior
Sugar daddy
Joined
Nov 13, 2005
Messages
5,020
2)
Am inclus in kernel accelerarea XOR pentru procesorul routerului. Vad in /sys si in kernel log ca xor este detectat:

mv_xor f1060900.xor: Marvell shared XOR driver
mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
mv_xor f10f0900.xor: Marvell shared XOR driver
mv_xor f10f0900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )

dar mai jos imi apare:

xor: measuring software checksum speed
arm4regs : 1201 MB/sec
8regs : 823 MB/sec
32regs : 1067 MB/sec
xor: using function: arm4regs (1201 MB/sec)

Eu ce sa inteleg, ca nu este in uz? Cum verific?
Idem pentru accelerarea crypto / aes. Cum verific daca este in uz?
 

lauru'_balauru'

Membru Senior
Sugar daddy
Joined
Jun 14, 2005
Messages
597
Eu zic ca accelerarea XOR este folosita, poti incerca sa vezi viteza inainte si dupa activare.
 

Marius '95

Membru Senior
Sugar daddy
Joined
Nov 13, 2005
Messages
5,020
Accelerarea crypto se verifica din openssl (sau alt ssl). Exista "openssl engine -c -t" si "openssl speed".
XOR n-am mai testat, ca practic nu-mi trebuie la nimic acolo.

-------------
Alta:
Vreau sa aflu care device-uri suporta power management. Statusul este in "/sys/<directoare diverse>/power/runtime_status". Fisierul "runtime_status" trebuie sa contina altceva decat "unsupported". Cum fac sa obtin o lista?
PS: "find -exec ..." nu-i disponibil (busybox).
 
Top Bottom