Bilan installation Raspberry Pi OS - Version serveur

Mise à jour : Raspberry Pi OS 11.1

Ce document décrit les caractéristiques principales d'une carte Raspberry Pi à l'issue de l'installation d'une image Pi OS version serveur.

Les informations ont été relevées sur un serveur Raspberry Pi 4 Pi4 avec OS Pi OS 32 bits, version Bullseye, fraîchement installé

Documentation Raspberry

Sommaire

1 - Configuration logicielle

$ lscpu |grep "Model name"
Model name: Cortex-A72

$ uname -m
armv7l

$ dpkg --print-architecture
armhf
$ vcgencmd version
Nov 8 2021 18:47:30
Copyright (c) 2012 Broadcom
version 4f73dcaefcfd5b20317e44a81d10e9d74fd3dffe (clean) (release) (start)
$ rpi-eeprom-update 
BOOTLOADER: up to date
CURRENT: mar. 06 juil. 2021 10:44:53 UTC (1625568293)
LATEST: jeu. 29 avril 2021 16:11:25 UTC (1619712685)
RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
Use raspi-config to change the release.

VL805_FW: Dedicated VL805 EEPROM
VL805: version unknown. Try sudo rpi-eeprom-update
CURRENT:
LATEST: 000138a1
$ vcgencmd bootloader_config
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0
$ cat /etc/debian_version 
11.1

$ cat /etc/issue
Raspbian GNU/Linux 11 \n \l

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
$ uname -r
5.10.78-v7l+
$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free

$ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ bullseye main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ bullseye main
$ cat /etc/fstab
proc /proc proc defaults 0 0
PARTUUID=8acef004-01 /boot vfat defaults 0 2
PARTUUID=8acef004-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
$ vcgencmd get_config str
device_tree=-
overlay_prefix=overlays/
hdmi_cvt:0=
hdmi_cvt:1=
hdmi_edid_filename:0=
hdmi_edid_filename:1=
hdmi_timings:0=
hdmi_timings:1=
$ vcgencmd get_config int
arm_boost=1
arm_freq=1500
audio_pwm_mode=514
camera_auto_detect=1
config_hdmi_boost=5
core_freq=500
core_freq_min=200
disable_commandline_tags=2
disable_l2cache=1
disable_overscan=1
display_auto_detect=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
dvfs=3
enable_gic=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=250
init_uart_clock=0x2dc6c00
lcd_framerate=60
mask_gpu_interrupt0=3072
mask_gpu_interrupt1=25635
max_framebuffers=2
over_voltage_avs=-17500
pause_burst_frames=1
program_serial_random=1
total_mem=2048
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300

2 - Amorçage

2.1 - Ligne de commande

$ cat /boot/cmdline.txt 
console=serial0,115200 console=tty1 \
root=PARTUUID=8acef004-02 rootfstype=ext4 fsck.repair=yes rootwait
$ cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Disable compensation for displays with overscan
disable_overscan=1

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]

$ cat /proc/cmdline 
coherent_pool=1M 8250.nr_uarts=0 \
snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 \
smsc95xx.macaddr=DC:A6:32:C9:70:EB \
vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 \
console=ttyS0,115200 console=tty1 \
root=PARTUUID=8acef004-02 rootfstype=ext4 fsck.repair=yes rootwait

2.2 - Messages du noyau

$ sudo dmesg -k -l emerg,alert

$ sudo dmesg -k -l crit
$ sudo dmesg -kl warn
[ 0.163153] usb_phy_generic phy: supply vcc not found, using dummy regulator
[ 1.471423] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1.473146] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.475042] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.478141] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1.479859] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 4.499038] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.523615] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.574228] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.574235] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.588914] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.596427] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.675235] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
$ sudo dmesg -kl err
$ sudo dmesg -k -l err
[ 4.864482] vc4_hdmi fef00700.hdmi: Could not register sound card: -517
[ 5.036449] vc4_hdmi fef00700.hdmi: Could not register sound card: -517
[ 5.191527] vc4_hdmi fef00700.hdmi: Could not register sound card: -517

2.3 - systemd

$ systemd-analyze
Startup finished in 2.035s (kernel) + 17.834s (userspace) = 19.870s
graphical.target reached after 17.787s in userspace
$ systemd-analyze blame
13.767s dhcpcd.service
7.327s hciuart.service
3.020s systemd-random-seed.service
1.517s raspi-config.service
1.402s dev-mmcblk0p2.device
1.256s rpi-eeprom-update.service
711ms systemd-logind.service
645ms dphys-swapfile.service
617ms networking.service
608ms systemd-udev-trigger.service
540ms keyboard-setup.service
510ms systemd-fsck@dev-disk-by\x2dpartuuid-8acef004\x2d01.service
480ms avahi-daemon.service
472ms e2scrub_reap.service
465ms user@1000.service
437ms rng-tools-debian.service
408ms ssh.service
375ms systemd-journald.service
364ms wpa_supplicant.service
343ms systemd-journal-flush.service
310ms systemd-udevd.service
280ms systemd-fsck-root.service
247ms alsa-restore.service
graphical.target @17.787s
└─multi-user.target @17.787s
└─dhcpcd.service @4.018s +13.767s
└─basic.target @3.914s
└─sockets.target @3.913s
└─triggerhappy.socket @3.913s
└─sysinit.target @3.882s
└─systemd-timesyncd.service @17.631s +118ms
└─systemd-tmpfiles-setup.service @3.291s +162ms
└─local-fs.target @3.240s
└─boot.mount @3.194s +44ms
└─systemd-fsck@dev-disk-by\x2dpartuuid-8acef004\x2d01.servi>
└─dev-disk-by\x2dpartuuid-8acef004\x2d01.device @2.653
$ systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
$ systemctl list-units -t service |wc -l
50

$ systemctl list-units -t service
UNIT LOAD ACTIVE SUB DESCRIPTION
alsa-restore.service loaded active exited Save/Restore Sound Card State
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
bluetooth.service loaded active running Bluetooth service
bthelper@hci0.service loaded active exited Raspberry Pi bluetooth helper
console-setup.service loaded active exited Set console font and keymap
cron.service loaded active running Regular background program processing daemon
dbus.service loaded active running D-Bus System Message Bus
dhcpcd.service loaded active running DHCP Client Daemon
dphys-swapfile.service loaded active exited dphys-swapfile - set up, mount/unmount, and delete a swap file
fake-hwclock.service loaded active exited Restore / save the current clock
getty@tty1.service loaded active running Getty on tty1
hciuart.service loaded active running Configure Bluetooth Modems connected by UART
ifupdown-pre.service loaded active exited Helper to synchronize boot up for ifupdown
keyboard-setup.service loaded active exited Set the console keyboard layout
kmod-static-nodes.service loaded active exited Create list of static device nodes for the current kernel
networking.service loaded active exited Raise network interfaces
raspi-config.service loaded active exited LSB: Switch to ondemand cpu governor (unless shift key is pressed)
rc-local.service loaded active exited /etc/rc.local Compatibility
rng-tools-debian.service loaded active running LSB: rng-tools (Debian variant)
rpi-eeprom-update.service loaded active exited Check for Raspberry Pi EEPROM updates
rsyslog.service loaded active running System Logging Service
ssh.service loaded active running OpenBSD Secure Shell server
systemd-fsck-root.service loaded active exited File System Check on Root Device
systemd-fsck@dev-disk-by\x2dpartuuid-8acef004\x2d01.service loaded active exited File System Check on /dev/disk/by-partuuid/8acef004-01
systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login Management
systemd-modules-load.service loaded active exited Load Kernel Modules
systemd-random-seed.service loaded active exited Load/Save Random Seed
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-sysusers.service loaded active exited Create System Users
systemd-timesyncd.service loaded active running Network Time Synchronization
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories
systemd-udev-trigger.service loaded active exited Coldplug All udev Devices
systemd-udevd.service loaded active running Rule-based Manager for Device Events and Files
systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown
systemd-user-sessions.service loaded active exited Permit User Sessions
triggerhappy.service loaded active running triggerhappy global hotkey daemon
user-runtime-dir@1000.service loaded active exited User Runtime Directory /run/user/1000
user@1000.service loaded active running User Manager for UID 1000
wpa_supplicant.service loaded active running WPA supplicant

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
43 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
$ pstree |wc -l
18

$ pstree
systemd─┬─agetty
├─avahi-daemon───avahi-daemon
├─bluetoothd
├─cron
├─dbus-daemon
├─dhcpcd
├─hciattach
├─rngd───3*[{rngd}]
├─rsyslogd───3*[{rsyslogd}]
├─sshd───sshd───sshd───bash───pstree
├─systemd───(sd-pam)
├─systemd-journal
├─systemd-logind
├─systemd-timesyn───{systemd-timesyn}
├─systemd-udevd
├─thd
└─2*[wpa_supplicant]

2.4 - Modules

$ lsmod |wc -l
65

$ lsmod
Module Size Used by
cmac 16384 3
algif_hash 16384 1
aes_arm_bs 24576 2
crypto_simd 16384 1 aes_arm_bs
cryptd 24576 2 crypto_simd
algif_skcipher 16384 1
af_alg 28672 6 algif_hash,algif_skcipher
bnep 20480 2
hci_uart 40960 1
btbcm 16384 1 hci_uart
bluetooth 393216 26 hci_uart,bnep,btbcm
ecdh_generic 16384 2 bluetooth
ecc 40960 1 ecdh_generic
8021q 32768 0
garp 16384 1 8021q
stp 16384 1 garp
llc 16384 2 garp,stp
snd_soc_hdmi_codec 20480 2
brcmfmac 327680 0
brcmutil 20480 1 brcmfmac
cfg80211 761856 1 brcmfmac
rfkill 32768 6 bluetooth,cfg80211
raspberrypi_hwmon 16384 0
v3d 73728 0
gpu_sched 45056 1 v3d
i2c_brcmstb 16384 0
bcm2835_v4l2 45056 0
videobuf2_vmalloc 16384 1 bcm2835_v4l2
bcm2835_codec 40960 0
bcm2835_isp 32768 0
v4l2_mem2mem 36864 1 bcm2835_codec
bcm2835_mmal_vchiq 32768 3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
vc4 274432 4
videobuf2_dma_contig 20480 2 bcm2835_isp,bcm2835_codec
videobuf2_memops 16384 2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2 32768 4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common 61440 5 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
cec 49152 1 vc4
videodev 249856 6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
mc 45056 6 bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
vc_sm_cma 32768 2 bcm2835_isp,bcm2835_mmal_vchiq
snd_bcm2835 24576 0
drm_kms_helper 241664 2 vc4
snd_soc_core 225280 2 vc4,snd_soc_hdmi_codec
snd_compress 20480 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
rpivid_mem 16384 0
snd_pcm 110592 5 snd_compress,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_bcm2835,snd_soc_core
nvmem_rmem 16384 0
snd_timer 32768 1 snd_pcm
snd 77824 6 snd_compress,snd_soc_hdmi_codec,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
uio_pdrv_genirq 16384 0
fb_sys_fops 16384 1 drm_kms_helper
uio 20480 1 uio_pdrv_genirq
drm 528384 5 v3d,vc4,gpu_sched,drm_kms_helper
drm_panel_orientation_quirks 16384 1 drm
backlight 20480 1 drm
fuse 126976 1
ip_tables 28672 0
x_tables 32768 1 ip_tables
ipv6 495616 24

3 - Périphériques

3.1 - Occupation

Par défaut, le gouverneur du processeur est ondemand et la fréquence varie en fonction de la charge du processeur
$ vcgencmd measure_clock arm
frequency(48)=600169920
$ dd if=/dev/urandom of=/dev/null count=1000 bs=1M & sleep 1 && \
vcgencmd measure_clock arm && sudo pkill dd
[1] 1102
frequency(48)=1500345728
[1]+ Complété dd if=/dev/urandom of=/dev/null count=1000 bs=1M
$ free -h
total utilisé libre partagé tamp/cache disponible
Mem: 1,8Gi 51Mi 1,7Gi 0,0Ki 101Mi 1,7Gi
Partition d'échange: 99Mi 0B 99Mi
$ df -h /
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
dev/root 14G 1,9G 12G 15% /
$ df -h /boot
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/mmcblk0p1 253M 49M 204M 20% /boot

3.2 - Bus

$ lspci
00:00.0 PCI bridge: Broadcom Limited Device 2711 (rev 10)
01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

ls$ lspci -k
00:00.0 PCI bridge: Broadcom Limited Device 2711 (rev 10)
Kernel driver in use: pcieport
01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)
Subsystem: VIA Technologies, Inc. VL805 USB 3.0 Host Controller
Kernel driver in use: xhci_hcd
$ lsusb |grep hub
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

$ lsusb -t |grep "Bus 01" |grep "Dev 1"
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M

$ lsusb -t |grep "Bus 02" |grep "Dev 1"
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
$ sudo apt install i2c-tools

$ i2cdetct -ls

3.3 - Réseau

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether dc:a6:32:c9:70:eb brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
link/ether dc:a6:32:c9:70:ec brd ff:ff:ff:ff:ff:ff

$ ip route
default via 192.168.0.1 dev wlan0 proto dhcp src 192.168.0.12 metric 303
192.168.0.0/24 dev wlan0 proto dhcp scope link src 192.168.0.12 metric 303

$ cat /etc/resolv.conf
# Generated by resolvconf
domain numericable.fr
nameserver 89.2.0.1
nameserver 89.2.0.2

$ hostname -s
raspberrypi

$ hostname -I
192.168.0.12

3.4 - Audio

$ aplay -l
**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: Headphones [bcm2835 Headphones], périphérique 0: bcm2835 Headphones [bcm2835 Headphones]
Sous-périphériques: 8/8
Sous-périphérique #0: subdevice #0
Sous-périphérique #1: subdevice #1
Sous-périphérique #2: subdevice #2
Sous-périphérique #3: subdevice #3
Sous-périphérique #4: subdevice #4
Sous-périphérique #5: subdevice #5
Sous-périphérique #6: subdevice #6
Sous-périphérique #7: subdevice #7
carte 1: vc4hdmi0 [vc4-hdmi-0], périphérique 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0
carte 2: vc4hdmi1 [vc4-hdmi-1], périphérique 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0

3.5 - Affichage

$ tvservice -s
tvservice is not supported when using the vc4-kms-v3d driver.
Similar features are available with standard linux tools
such as modetest from libdrm-tests.

$ sudo aptitude install libdrm-tests
$ modetest -f
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...failed
trying to open device 'rockchip'...failed
trying to open device 'atmel-hlcdc'...failed
trying to open device 'fsl-dcu-drm'...failed
trying to open device 'vc4'...done
Frame buffers:
id size pitch

$ fbset
open /dev/fb0: No such file or directory

4 - Capteurs

$ vcgencmd measure_temp
temp=41.8'C
$ vcgencmd measure_volts core
volt=0.862V

$ vcgencmd measure_volts sdram_c
volt=1.1000V

$ vcgencmd measure_volts sdram_p
volt=1.1000V
$ sudo dmesg |grep -i voltage