768 lines
20 KiB
Markdown
768 lines
20 KiB
Markdown
# Analyse des Données de Benchmarking
|
||
|
||
Ce document identifie toutes les données intéressantes à collecter basées sur les résultats réels des benchmarks.
|
||
|
||
---
|
||
|
||
## 📊 1. BENCHMARKS - Données à récupérer
|
||
|
||
### 1.1 CPU (sysbench)
|
||
|
||
**Commande testée** :
|
||
```bash
|
||
sysbench cpu --cpu-max-prime=10000 --threads=$(nproc) run
|
||
```
|
||
|
||
**Output analysé** :
|
||
```
|
||
CPU speed:
|
||
events per second: 3409.87
|
||
|
||
General statistics:
|
||
total time: 10.0005s
|
||
total number of events: 34107
|
||
|
||
Latency (ms):
|
||
min: 1.10
|
||
avg: 1.17
|
||
max: 15.92
|
||
95th percentile: 1.23
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `events_per_second` : **3409.87** (métrique principale pour score)
|
||
- `total_time` : 10.0005s (durée du test)
|
||
- `avg_latency_ms` : 1.17 (latence moyenne)
|
||
|
||
**❌ Données OPTIONNELLES** (peuvent être ignorées pour l'instant) :
|
||
- min/max latency
|
||
- 95th percentile
|
||
- threads fairness
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
events_per_sec=$(sysbench cpu ... | grep 'events per second' | awk '{print $4}')
|
||
```
|
||
|
||
---
|
||
|
||
### 1.2 MEMORY (sysbench)
|
||
|
||
**Commande testée** :
|
||
```bash
|
||
sysbench memory --memory-block-size=1M --memory-total-size=512M run
|
||
```
|
||
|
||
**Output analysé** :
|
||
```
|
||
512.00 MiB transferred (13806.03 MiB/sec)
|
||
|
||
General statistics:
|
||
total time: 0.0351s
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `throughput_mib_s` : **13806.03** MiB/sec (métrique principale)
|
||
- `total_time` : 0.0351s
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
throughput=$(sysbench memory ... | grep 'MiB/sec' | grep -oP '\d+\.\d+ MiB/sec' | awk '{print $1}')
|
||
```
|
||
|
||
---
|
||
|
||
### 1.3 DISK (fio) - Format JSON
|
||
|
||
**Commande testée** :
|
||
```bash
|
||
fio --name=test --ioengine=libaio --rw=randrw --bs=4k --size=100M \
|
||
--numjobs=1 --direct=1 --filename=/tmp/fio-test-file --output-format=json
|
||
```
|
||
|
||
**Output JSON (extrait)** :
|
||
```json
|
||
{
|
||
"read": {
|
||
"bw_bytes": 728177777,
|
||
"bw": 711111,
|
||
"iops": 177777.777778,
|
||
"runtime": 72
|
||
},
|
||
"write": {
|
||
"bw_bytes": 728177777,
|
||
"bw": 711111,
|
||
"iops": 177777.777778
|
||
}
|
||
}
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `read.bw` : 711111 KiB/s → convertir en MB/s : **711 MB/s**
|
||
- `write.bw` : 711111 KiB/s → convertir en MB/s : **711 MB/s**
|
||
- `read.iops` : **177777** (operations/sec)
|
||
- `write.iops` : **177777** (operations/sec)
|
||
- `read.clat_ns.mean` : latence moyenne en nanosecondes
|
||
|
||
**Parsing recommandé (avec jq)** :
|
||
```bash
|
||
fio_output=$(fio ... --output-format=json)
|
||
read_mb_s=$(echo "$fio_output" | jq '.jobs[0].read.bw / 1024')
|
||
write_mb_s=$(echo "$fio_output" | jq '.jobs[0].write.bw / 1024')
|
||
iops_read=$(echo "$fio_output" | jq '.jobs[0].read.iops')
|
||
iops_write=$(echo "$fio_output" | jq '.jobs[0].write.iops')
|
||
latency_ns=$(echo "$fio_output" | jq '.jobs[0].read.clat_ns.mean')
|
||
latency_ms=$(echo "scale=3; $latency_ns / 1000000" | bc)
|
||
```
|
||
|
||
---
|
||
|
||
### 1.4 NETWORK (iperf3) - Format JSON
|
||
|
||
**Commande testée** :
|
||
```bash
|
||
iperf3 -c 10.0.1.97 -t 5 -J
|
||
```
|
||
|
||
**Output JSON (extrait)** :
|
||
```json
|
||
{
|
||
"end": {
|
||
"sum_sent": {
|
||
"bits_per_second": 327057987.07346243,
|
||
"retransmits": 102
|
||
},
|
||
"sum_received": {
|
||
"bits_per_second": 323523050.66083658
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `upload_mbps` : 327057987 / 1000000 = **327 Mbps** (bits_per_second sender)
|
||
- `download_mbps` : **323 Mbps** (pour test en reverse -R)
|
||
- `retransmits` : 102 (nombre de retransmissions)
|
||
- `mean_rtt` : 53143 µs (ping moyen)
|
||
|
||
**Parsing recommandé (avec jq)** :
|
||
```bash
|
||
upload_bits=$(echo "$iperf_json" | jq '.end.sum_sent.bits_per_second')
|
||
upload_mbps=$(echo "scale=2; $upload_bits / 1000000" | bc)
|
||
rtt_us=$(echo "$iperf_json" | jq '.end.streams[0].sender.mean_rtt')
|
||
ping_ms=$(echo "scale=2; $rtt_us / 1000" | bc)
|
||
```
|
||
|
||
---
|
||
|
||
## 🖥️ 2. HARDWARE - Données à récupérer
|
||
|
||
### 2.1 CPU (lscpu + dmidecode)
|
||
|
||
**Commande testée** : `lscpu` (output en français sur ta machine)
|
||
|
||
**Output analysé** :
|
||
```
|
||
Identifiant constructeur : GenuineIntel
|
||
Nom de modèle : Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
|
||
Processeur(s) : 4
|
||
Thread(s) par cœur : 1
|
||
Cœur(s) par socket : 4
|
||
Socket(s) : 1
|
||
Vitesse maximale du processeur en MHz : 3400,0000
|
||
Vitesse minimale du processeur en MHz : 1600,0000
|
||
|
||
Caches (somme de toutes) :
|
||
L1d : 128 KiB (4 instances)
|
||
L1i : 128 KiB (4 instances)
|
||
L2 : 1 MiB (4 instances)
|
||
L3 : 6 MiB (1 instance)
|
||
|
||
Drapeaux : fpu vme de pse tsc msr ... avx sse4_1 sse4_2 ...
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `vendor` : **GenuineIntel**
|
||
- `model` : **Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz**
|
||
- `microarchitecture` : Peut être déduit du model (Sandy Bridge pour i5-2400)
|
||
- `cores` : **4** (cœurs physiques)
|
||
- `threads` : **4** (4 cœurs × 1 thread = 4)
|
||
- `base_freq_ghz` : **3.1** GHz (du nom du modèle)
|
||
- `max_freq_ghz` : **3.4** GHz
|
||
- `cache_l1_kb` : 128 + 128 = **256 KB** (L1d + L1i)
|
||
- `cache_l2_kb` : 1024 KB = **1024 KB**
|
||
- `cache_l3_kb` : 6144 KB = **6144 KB**
|
||
- `flags` : ["avx", "sse4_1", "sse4_2", "aes", "pclmulqdq", ...] (important pour virtualisation)
|
||
|
||
**⚠️ PROBLÈME DÉTECTÉ** :
|
||
```bash
|
||
echo "Cores: $(lscpu | grep '^CPU(s):' | awk '{print $2}')"
|
||
# Retourne vide car en français : "Processeur(s) :"
|
||
```
|
||
|
||
**✅ SOLUTION - Forcer locale en anglais** :
|
||
```bash
|
||
LC_ALL=C lscpu
|
||
# Ou utiliser lscpu -J pour JSON et parser avec jq
|
||
```
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
export LC_ALL=C
|
||
vendor=$(lscpu | grep 'Vendor ID' | awk '{print $3}')
|
||
model=$(lscpu | grep 'Model name' | sed 's/Model name: *//' | xargs)
|
||
cores=$(lscpu | grep '^CPU(s):' | awk '{print $2}')
|
||
threads=$(nproc)
|
||
max_freq=$(lscpu | grep 'CPU max MHz' | awk '{print $4}')
|
||
max_freq_ghz=$(echo "scale=2; $max_freq / 1000" | bc)
|
||
|
||
# Caches
|
||
cache_l1d=$(lscpu | grep 'L1d cache' | awk '{print $3}' | sed 's/K//')
|
||
cache_l1i=$(lscpu | grep 'L1i cache' | awk '{print $3}' | sed 's/K//')
|
||
cache_l2=$(lscpu | grep 'L2 cache' | awk '{print $3}' | sed 's/[MK]//')
|
||
cache_l3=$(lscpu | grep 'L3 cache' | awk '{print $3}' | sed 's/[MK]//')
|
||
|
||
# Flags (liste complète)
|
||
flags=$(lscpu | grep 'Flags:' | sed 's/Flags: *//')
|
||
```
|
||
|
||
**❌ Données MANQUANTES actuellement** :
|
||
- `tdp_w` : Non disponible via lscpu, peut être récupéré via dmidecode ou base de données constructeur
|
||
|
||
---
|
||
|
||
### 2.2 RAM (free + dmidecode)
|
||
|
||
**Commande testée** : `free -m` + `sudo dmidecode -t memory`
|
||
|
||
**Output free -m** :
|
||
```
|
||
total utilisé libre partagé tamp/cache disponible
|
||
Mem: 7771 5847 1479 678 1410 1923
|
||
```
|
||
|
||
**Output dmidecode -t memory** (extrait) :
|
||
```
|
||
Physical Memory Array
|
||
Error Correction Type: None
|
||
Maximum Capacity: 32 GB
|
||
Number Of Devices: 4
|
||
|
||
Memory Device
|
||
Size: 2 GB
|
||
Form Factor: DIMM
|
||
Locator: A1_DIMM0
|
||
Type: DDR3
|
||
Speed: 1333 MT/s
|
||
Manufacturer: Samsung
|
||
Part Number: M378B5773DH0-CH9
|
||
Rank: 1
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `total_mb` : **7771 MB** (du free -m)
|
||
- `slots_total` : **4** (Number Of Devices)
|
||
- `slots_used` : **4** (compter les Memory Device avec Size > 0)
|
||
- `ecc` : **false** (Error Correction Type: None)
|
||
- `layout` : Array de:
|
||
- `slot` : "A1_DIMM0", "A1_DIMM1", "A1_DIMM2", "A1_DIMM3"
|
||
- `size_mb` : 2048 (2 GB)
|
||
- `type` : "DDR3"
|
||
- `speed_mhz` : 1333
|
||
- `manufacturer` : "Samsung" ou "Kingston"
|
||
- `part_number` : "M378B5773DH0-CH9" ou "ACR256X64D3U1333C9"
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
# Total RAM
|
||
total_mb=$(free -m | grep '^Mem:' | awk '{print $2}')
|
||
|
||
# Avec dmidecode (nécessite sudo)
|
||
if command -v dmidecode &> /dev/null && [ $(id -u) -eq 0 ]; then
|
||
ecc=$(sudo dmidecode -t 16 | grep 'Error Correction Type' | grep -q 'None' && echo "false" || echo "true")
|
||
slots_total=$(sudo dmidecode -t 16 | grep 'Number Of Devices' | awk '{print $4}')
|
||
|
||
# Parser chaque DIMM (complexe, nécessite parsing multi-lignes)
|
||
# Voir script complet ci-dessous
|
||
fi
|
||
```
|
||
|
||
---
|
||
|
||
### 2.3 GPU (lspci + nvidia-smi)
|
||
|
||
**Commande testée** : `lspci | grep -i vga`
|
||
|
||
**Output analysé** :
|
||
```
|
||
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `vendor` : **Intel Corporation**
|
||
- `model` : **2nd Generation Core Processor Family Integrated Graphics Controller**
|
||
- `pci_id` : **00:02.0**
|
||
|
||
**Pour GPU NVIDIA** (nvidia-smi) :
|
||
```bash
|
||
nvidia-smi --query-gpu=name,memory.total,driver_version,vbios_version --format=csv,noheader
|
||
# Output: GeForce RTX 3070, 8192 MiB, 525.105.17, 94.02.42.00.35
|
||
```
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
gpu_info=$(lspci | grep -i vga | head -1)
|
||
if echo "$gpu_info" | grep -qi 'nvidia'; then
|
||
gpu_vendor="NVIDIA"
|
||
gpu_model=$(nvidia-smi --query-gpu=name --format=csv,noheader | head -1)
|
||
gpu_vram=$(nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits | head -1)
|
||
elif echo "$gpu_info" | grep -qi 'intel'; then
|
||
gpu_vendor="Intel"
|
||
gpu_model=$(echo "$gpu_info" | sed 's/.*: //' | sed 's/ (rev.*//')
|
||
gpu_vram=null
|
||
else
|
||
gpu_vendor=$(echo "$gpu_info" | awk -F: '{print $3}' | awk '{print $1, $2}')
|
||
gpu_model=$(echo "$gpu_info" | sed 's/.*: //')
|
||
fi
|
||
```
|
||
|
||
---
|
||
|
||
### 2.4 MOTHERBOARD (dmidecode)
|
||
|
||
**Commande testée** : `sudo dmidecode -t baseboard`
|
||
|
||
**Output analysé** :
|
||
```
|
||
Base Board Information
|
||
Manufacturer: LENOVO
|
||
Product Name:
|
||
Version:
|
||
Serial Number: INVALID
|
||
```
|
||
|
||
**⚠️ PROBLÈME** : Product Name est vide sur ta machine Lenovo (OEM)
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `manufacturer` : **LENOVO**
|
||
- `model` : **(vide sur certaines machines)**
|
||
- `version` : (vide)
|
||
|
||
**Alternative - dmidecode -t 1 (System Information)** :
|
||
```bash
|
||
sudo dmidecode -t 1 | grep -E 'Manufacturer|Product Name|Version'
|
||
```
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
if command -v dmidecode &> /dev/null && [ $(id -u) -eq 0 ]; then
|
||
mb_manufacturer=$(sudo dmidecode -t 2 | grep 'Manufacturer:' | sed 's/.*: *//' | xargs)
|
||
mb_model=$(sudo dmidecode -t 2 | grep 'Product Name:' | sed 's/.*: *//' | xargs)
|
||
[ -z "$mb_model" ] && mb_model="Unknown"
|
||
fi
|
||
```
|
||
|
||
**❌ Données MANQUANTES actuellement** :
|
||
- `bios_version` : Disponible via `dmidecode -t 0`
|
||
- `bios_date` : Disponible via `dmidecode -t 0`
|
||
|
||
---
|
||
|
||
### 2.5 STORAGE (lsblk + smartctl)
|
||
|
||
**Commande testée** : `lsblk -J` + `sudo smartctl -i /dev/sda`
|
||
|
||
**Output lsblk -J** (extrait) :
|
||
```json
|
||
{
|
||
"blockdevices": [
|
||
{
|
||
"name": "sda",
|
||
"size": "447,1G",
|
||
"type": "disk",
|
||
"children": [
|
||
{"name": "sda1", "size": "7,4G", "type": "part", "mountpoints": ["[SWAP]"]},
|
||
{"name": "sda5", "size": "439,7G", "type": "part", "mountpoints": ["/"]}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
```
|
||
|
||
**Output smartctl** :
|
||
```
|
||
Device Model: KINGSTON SA400S37480G
|
||
Serial Number: 50026B77833E25E3
|
||
User Capacity: 480 103 981 056 bytes [480 GB]
|
||
Rotation Rate: Solid State Device
|
||
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `device` : **sda**
|
||
- `model` : **KINGSTON SA400S37480G**
|
||
- `size_gb` : **480** GB
|
||
- `type` : **ssd** (ou hdd si Rotation Rate ≠ SSD)
|
||
- `interface` : **sata** (ou nvme, usb)
|
||
- `serial` : **50026B77833E25E3**
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
# Liste des disques (JSON)
|
||
disks_json=$(lsblk -J -o NAME,SIZE,TYPE,ROTA,TRAN)
|
||
|
||
# Pour chaque disque
|
||
for disk in $(lsblk -d -n -o NAME); do
|
||
model=$(sudo smartctl -i /dev/$disk 2>/dev/null | grep 'Device Model' | sed 's/.*: *//')
|
||
size=$(lsblk -d -n -o SIZE /dev/$disk | sed 's/,/./')
|
||
type=$(lsblk -d -n -o ROTA /dev/$disk) # 0=SSD, 1=HDD
|
||
[ "$type" = "0" ] && disk_type="ssd" || disk_type="hdd"
|
||
interface=$(lsblk -d -n -o TRAN /dev/$disk) # sata, nvme, usb
|
||
done
|
||
```
|
||
|
||
---
|
||
|
||
### 2.6 NETWORK (ip link)
|
||
|
||
**Commande testée** : `ip link show`
|
||
|
||
**Output analysé** :
|
||
```
|
||
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
|
||
link/ether 44:37:e6:6b:53:86 brd ff:ff:ff:ff:ff:ff
|
||
|
||
3: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
|
||
link/ether 14:f6:d8:67:27:b7 brd ff:ff:ff:ff:ff:ff
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `name` : **eno1**, **wlp2s0**
|
||
- `mac` : **44:37:e6:6b:53:86**
|
||
- `state` : **UP** ou **DOWN**
|
||
- `type` : **ethernet** (eno*, eth*) ou **wifi** (wlp*, wlan*)
|
||
- `speed_mbps` : Via `ethtool eno1 | grep Speed` → "Speed: 1000Mb/s"
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
# Interfaces actives
|
||
for iface in $(ip -br link show | grep UP | awk '{print $1}'); do
|
||
# Ignorer loopback, docker, bridges
|
||
[[ "$iface" =~ ^(lo|docker|br-|veth) ]] && continue
|
||
|
||
mac=$(ip link show $iface | grep 'link/ether' | awk '{print $2}')
|
||
|
||
# Type d'interface
|
||
if [[ "$iface" =~ ^(eth|eno|enp) ]]; then
|
||
type="ethernet"
|
||
elif [[ "$iface" =~ ^(wlan|wlp) ]]; then
|
||
type="wifi"
|
||
else
|
||
type="unknown"
|
||
fi
|
||
|
||
# Vitesse (nécessite ethtool)
|
||
if command -v ethtool &> /dev/null; then
|
||
speed=$(sudo ethtool $iface 2>/dev/null | grep 'Speed:' | awk '{print $2}' | sed 's/Mb\/s//')
|
||
fi
|
||
done
|
||
```
|
||
|
||
---
|
||
|
||
### 2.7 OS (os-release + uname)
|
||
|
||
**Commande testée** : `cat /etc/os-release` + `uname -r` + `uname -m`
|
||
|
||
**Output analysé** :
|
||
```
|
||
ID=debian
|
||
VERSION_ID="13"
|
||
VERSION="13 (trixie)"
|
||
VERSION_CODENAME=trixie
|
||
|
||
6.12.57+deb13-amd64
|
||
x86_64
|
||
```
|
||
|
||
**✅ Données IMPORTANTES à extraire** :
|
||
- `name` : **debian**
|
||
- `version` : **13 (trixie)**
|
||
- `kernel_version` : **6.12.57+deb13-amd64**
|
||
- `architecture` : **x86_64**
|
||
|
||
**Parsing recommandé** :
|
||
```bash
|
||
os_name=$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
|
||
os_version=$(grep '^VERSION=' /etc/os-release | cut -d= -f2 | tr -d '"')
|
||
kernel=$(uname -r)
|
||
arch=$(uname -m)
|
||
```
|
||
|
||
---
|
||
|
||
## 🔍 3. DONNÉES SUPPLÉMENTAIRES INTÉRESSANTES
|
||
|
||
### 3.1 BIOS (dmidecode -t 0)
|
||
|
||
**Pourquoi c'est utile** : Version BIOS/UEFI peut affecter performances, compatibilité
|
||
|
||
```bash
|
||
sudo dmidecode -t 0
|
||
# Output:
|
||
# Vendor: LENOVO
|
||
# Version: 9SKT91AUS
|
||
# Release Date: 03/30/2012
|
||
```
|
||
|
||
**✅ Données à extraire** :
|
||
- `bios_vendor` : LENOVO
|
||
- `bios_version` : 9SKT91AUS
|
||
- `bios_date` : 03/30/2012
|
||
|
||
---
|
||
|
||
### 3.2 PCI Version (lspci -v)
|
||
|
||
**Pourquoi c'est utile** : PCIe gen (2.0, 3.0, 4.0, 5.0) affecte bande passante GPU/NVMe
|
||
|
||
```bash
|
||
sudo lspci -vv -s 00:02.0 | grep 'LnkCap:'
|
||
# Output:
|
||
# LnkCap: Port #0, Speed 2.5GT/s, Width x16
|
||
# → PCIe 2.0 x16
|
||
```
|
||
|
||
**✅ Données à extraire** :
|
||
- `pcie_version` : 2.0, 3.0, 4.0, 5.0
|
||
- `pcie_lanes` : x1, x4, x8, x16
|
||
|
||
**❌ COMPLEXITÉ** : Parsing difficile, pas prioritaire pour MVP
|
||
|
||
---
|
||
|
||
### 3.3 USB Version (lsusb)
|
||
|
||
**Pourquoi c'est utile** : USB 2.0 / 3.0 / 3.1 / 4.0 pour périphériques
|
||
|
||
```bash
|
||
lsusb
|
||
# Output:
|
||
# Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
||
# Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
||
```
|
||
|
||
**✅ Données à extraire** :
|
||
- `usb_controllers` : ["USB 2.0", "USB 3.0"]
|
||
|
||
**❌ PAS PRIORITAIRE** pour benchmarking hardware
|
||
|
||
---
|
||
|
||
### 3.4 Température CPU (sensors)
|
||
|
||
**Pourquoi c'est utile** : Throttling thermique affecte performances
|
||
|
||
```bash
|
||
sensors
|
||
# Output:
|
||
# coretemp-isa-0000
|
||
# Core 0: +45.0°C
|
||
# Core 1: +43.0°C
|
||
```
|
||
|
||
**✅ Données à extraire** :
|
||
- `cpu_temp_celsius` : 45.0 (moyenne des cores)
|
||
|
||
**❌ PAS PRIORITAIRE** pour MVP (nécessite lm-sensors installé)
|
||
|
||
---
|
||
|
||
### 3.5 Consommation électrique (TDP)
|
||
|
||
**Pourquoi c'est utile** : Efficacité énergétique (perf/watt)
|
||
|
||
**Problème** : Pas accessible via commandes Linux standard
|
||
- Nécessite lookup dans base de données (ark.intel.com, AMD specs)
|
||
- Ou lecture via RAPL (Running Average Power Limit) si supporté
|
||
|
||
**❌ NON IMPLÉMENTABLE** facilement sans DB externe
|
||
|
||
---
|
||
|
||
## 📋 4. RÉSUMÉ - Priorités d'implémentation
|
||
|
||
### ✅ NIVEAU 1 - ESSENTIEL (déjà partiellement fait)
|
||
|
||
| Catégorie | Données | Outil | Parsing |
|
||
|-----------|---------|-------|---------|
|
||
| CPU Bench | events_per_sec, latency | sysbench | ✅ Simple (grep/awk) |
|
||
| Memory Bench | throughput_mib_s | sysbench | ✅ Simple (grep/awk) |
|
||
| Disk Bench | read/write MB/s, IOPS | fio JSON | ✅ Moyen (jq) |
|
||
| Network Bench | upload/download Mbps | iperf3 JSON | ✅ Moyen (jq) |
|
||
| CPU Info | vendor, model, cores, threads | lscpu | ⚠️ Locale issue |
|
||
| RAM Info | total_mb | free | ✅ Simple |
|
||
| OS Info | name, version, kernel | os-release | ✅ Simple |
|
||
|
||
**Actions requises** :
|
||
1. ✅ Forcer `LC_ALL=C` pour lscpu
|
||
2. ✅ Utiliser JSON pour fio/iperf3
|
||
3. ✅ Parser correctement les résultats
|
||
|
||
---
|
||
|
||
### ✅ NIVEAU 2 - IMPORTANT (enrichissement)
|
||
|
||
| Catégorie | Données | Outil | Complexité |
|
||
|-----------|---------|-------|-----------|
|
||
| CPU Detail | freq, caches, flags | lscpu | Moyen |
|
||
| RAM Detail | slots, type, speed, ECC | dmidecode | Élevée (sudo required) |
|
||
| GPU | vendor, model, vram | lspci, nvidia-smi | Moyen |
|
||
| Storage | model, size, type (SSD/HDD) | lsblk, smartctl | Moyen (sudo) |
|
||
| Network | interfaces, MAC, speed | ip, ethtool | Moyen |
|
||
| Motherboard | manufacturer, model | dmidecode | Simple (sudo) |
|
||
|
||
**Actions requises** :
|
||
1. ✅ Implémenter détection dmidecode (avec fallback si sudo manquant)
|
||
2. ✅ Parser GPU (lspci minimum, nvidia-smi si dispo)
|
||
3. ✅ Collecter storage avec smartctl (optionnel)
|
||
|
||
---
|
||
|
||
### ⚠️ NIVEAU 3 - NICE TO HAVE (futur)
|
||
|
||
| Données | Outil | Priorité | Raison |
|
||
|---------|-------|----------|--------|
|
||
| BIOS version/date | dmidecode -t 0 | Basse | Utile mais pas critique |
|
||
| PCIe version | lspci -vv | Basse | Parsing complexe |
|
||
| USB controllers | lsusb | Très basse | Peu utile pour bench |
|
||
| CPU temp | sensors | Moyenne | Nécessite lm-sensors |
|
||
| TDP | DB externe | Très basse | Non faisable simplement |
|
||
|
||
**Actions** : À voir après MVP fonctionnel
|
||
|
||
---
|
||
|
||
## 🎯 5. RECOMMANDATIONS POUR LE SCRIPT
|
||
|
||
### Stratégie de collecte
|
||
|
||
1. **Hardware basique (sans sudo)** :
|
||
- ✅ lscpu (avec LC_ALL=C)
|
||
- ✅ free
|
||
- ✅ lspci
|
||
- ✅ lsblk
|
||
- ✅ ip link
|
||
- ✅ /etc/os-release
|
||
|
||
2. **Hardware avancé (avec sudo optionnel)** :
|
||
- ⚠️ dmidecode (RAM layout, motherboard, BIOS)
|
||
- ⚠️ smartctl (modèle SSD/HDD)
|
||
- ⚠️ ethtool (vitesse réseau)
|
||
|
||
3. **Gestion des cas** :
|
||
- Si `sudo` non disponible → Collecter infos basiques uniquement
|
||
- Si outil manquant → Retourner `null` pour ce champ
|
||
- Si erreur → Log warning, continuer
|
||
|
||
### JSON final recommandé
|
||
|
||
```json
|
||
{
|
||
"hardware": {
|
||
"cpu": {
|
||
"vendor": "GenuineIntel",
|
||
"model": "Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz",
|
||
"cores": 4,
|
||
"threads": 4,
|
||
"base_freq_ghz": 3.1,
|
||
"max_freq_ghz": 3.4,
|
||
"cache_l1_kb": 256,
|
||
"cache_l2_kb": 1024,
|
||
"cache_l3_kb": 6144,
|
||
"flags": ["avx", "sse4_1", "sse4_2"]
|
||
},
|
||
"ram": {
|
||
"total_mb": 7771,
|
||
"slots_total": 4,
|
||
"slots_used": 4,
|
||
"ecc": false,
|
||
"layout": [
|
||
{"slot": "DIMM0", "size_mb": 2048, "type": "DDR3", "speed_mhz": 1333, "manufacturer": "Samsung"}
|
||
]
|
||
},
|
||
"gpu": {
|
||
"vendor": "Intel Corporation",
|
||
"model": "2nd Gen Core Processor Family IGP",
|
||
"vram_mb": null
|
||
},
|
||
"motherboard": {
|
||
"manufacturer": "LENOVO",
|
||
"model": "Unknown",
|
||
"bios_version": "9SKT91AUS",
|
||
"bios_date": "03/30/2012"
|
||
},
|
||
"storage": [
|
||
{"device": "sda", "model": "KINGSTON SA400S37480G", "size_gb": 480, "type": "ssd", "interface": "sata"}
|
||
],
|
||
"network": [
|
||
{"name": "eno1", "type": "ethernet", "speed_mbps": 1000, "mac": "44:37:e6:6b:53:86"}
|
||
],
|
||
"os": {
|
||
"name": "debian",
|
||
"version": "13 (trixie)",
|
||
"kernel_version": "6.12.57+deb13-amd64",
|
||
"architecture": "x86_64"
|
||
}
|
||
},
|
||
"results": {
|
||
"cpu": {
|
||
"events_per_sec": 3409.87,
|
||
"duration_s": 10.0005,
|
||
"score": 34.1
|
||
},
|
||
"memory": {
|
||
"throughput_mib_s": 13806.03,
|
||
"score": 69.0
|
||
},
|
||
"disk": {
|
||
"read_mb_s": 711,
|
||
"write_mb_s": 711,
|
||
"iops_read": 177777,
|
||
"iops_write": 177777,
|
||
"latency_ms": 0.002,
|
||
"score": 85.0
|
||
},
|
||
"network": {
|
||
"upload_mbps": 327,
|
||
"download_mbps": 323,
|
||
"ping_ms": 53.1,
|
||
"score": 32.7
|
||
},
|
||
"global_score": 55.2
|
||
}
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## ✅ CONCLUSION
|
||
|
||
**Données ESSENTIELLES déjà disponibles** : ✅
|
||
- Benchmarks (CPU, RAM, Disk, Network) → Parsing fonctionne
|
||
- Infos basiques (CPU, RAM, OS) → Parsing à corriger (locale)
|
||
|
||
**Données IMPORTANTES à ajouter** : ⚠️
|
||
- CPU détaillé (fréquences, caches, flags)
|
||
- RAM détaillée (dmidecode)
|
||
- GPU (lspci minimum)
|
||
- Storage (lsblk + smartctl)
|
||
- Network (ip link + ethtool)
|
||
|
||
**Données OPTIONNELLES** : 💡
|
||
- BIOS
|
||
- PCI version
|
||
- Température CPU
|
||
|
||
**Prochaine étape** : Modifier le script bench.sh pour collecter toutes les données NIVEAU 1 et NIVEAU 2
|