Separate system configuration from Dotfiles_ArchAP. Add package manifests, system inventories, reusable templates, safer backup/deployment scripts, on-demand service management, TLP and zram configuration, and updated maintenance documentation.
55 lines
1.4 KiB
Bash
Executable file
55 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -u
|
|
|
|
section() { printf '\n=== %s ===\n' "$1"; }
|
|
|
|
section "CHARGE"
|
|
uptime
|
|
|
|
section "MÉMOIRE"
|
|
free -h
|
|
swapon --show
|
|
|
|
section "PRESSION"
|
|
for file in /proc/pressure/{cpu,memory,io}; do
|
|
printf '%s\n' "--- $file"
|
|
cat "$file"
|
|
done
|
|
|
|
section "DISQUE"
|
|
df -h /
|
|
sudo btrfs filesystem usage /
|
|
|
|
section "TOP CPU"
|
|
ps -eo pid,comm,%cpu,%mem,rss --sort=-%cpu | head -n 20
|
|
|
|
section "TOP RAM"
|
|
ps -eo pid,comm,%cpu,%mem,rss --sort=-rss | head -n 20
|
|
|
|
section "SERVICES EN ÉCHEC"
|
|
systemctl --failed
|
|
systemctl --user --failed
|
|
|
|
section "SERVICES À LA DEMANDE"
|
|
for unit in vmware-networks.service vmware-usbarbitrator.service smb.service nmb.service; do
|
|
printf '%-36s enabled=%-10s active=%s\n' \
|
|
"$unit" \
|
|
"$(systemctl is-enabled "$unit" 2>/dev/null || true)" \
|
|
"$(systemctl is-active "$unit" 2>/dev/null || true)"
|
|
done
|
|
printf '%-36s enabled=%-10s active=%s\n' \
|
|
protonmail-bridge.service \
|
|
"$(systemctl --user is-enabled protonmail-bridge.service 2>/dev/null || true)" \
|
|
"$(systemctl --user is-active protonmail-bridge.service 2>/dev/null || true)"
|
|
|
|
section "PROCESSUS INDÉSIRABLES AU REPOS"
|
|
pgrep -a -f 'nextcloud|thunderbird|protonmail-bridge|/protonmail/bridge|proton-pass|ollama|llama-server' \
|
|
|| echo "Aucun"
|
|
|
|
section "BATTERIE"
|
|
cat /sys/class/power_supply/BAT1/charge_control_end_threshold 2>/dev/null || true
|
|
|
|
section "DÉMARRAGE"
|
|
systemd-analyze
|
|
systemd-analyze blame | head -n 15
|