IT Toolbox

Linux / Debian Center

Linux / Debian / systemd

Linux / Debian Center

A practical starting point for diagnosing a Linux server: services, networking, SSH, storage, packages, performance, logs and local security.

Générateur de rapport express

Sélectionnez le contexte : BAOI génère un bloc de commandes en lecture seule à exécuter puis à copier dans un ticket ou un rapport.

SystèmeRésumé système
uname -a && cat /etc/os-release
SystèmeUptime / load
uptime
SystèmeUnités en erreur
systemctl --failed
SystèmeErreurs boot courant
journalctl -b -p err..alert
CPUProcessus CPU
ps aux --sort=-%cpu | head
Cheat sheetireCheat sheetire et swap
free -h && swapon --show
Cheat sheetireProcessus mémoire
ps aux --sort=-%mem | head
DisqueFilesystems
df -hT
DisqueInodes
df -i
DisquePlus gros répertoires
du -xhd1 /var | sort -h
NetworkingInterfaces
ip -br addr
NetworkingRoutes
ip route
NetworkingPorts en écoute
ss -lntup
DNSÉtat DNS
resolvectl status
DNSTester DNS
dig example.com
SSHTester config sshd
sshd -t
SSHLogs SSH
journalctl -u ssh -b --no-pager
APTAudit dpkg
dpkg --audit
APTRéparer configuration
dpkg --configure -a
APTDépendances cassées
apt-get -f install
LogsDernière heure
journalctl --since '1 hour ago'
LogsUsage journal
journalctl --disk-usage
TempsDate / NTP
timedatectl
PermissionsChemin et droits
namei -l /chemin/fichier
Firewallnftables
nft list ruleset
DockerConteneurs
docker ps -a
DockerEspace Docker
docker system df
01

Logs d’abord

Lire journalctl avant de redémarrer un service en boucle.

02

df -h et df -i

Un système peut manquer d’inodes avec encore beaucoup de Go disponibles.

03

Permissions

Éviter chmod 777 : identifier owner, groupe, ACL et contexte.

04

APT

Ne jamais supprimer un lock dpkg sans confirmer qu’aucun processus valide ne tourne.

05

Filesystem

Un remount read-only peut signaler une panne disque ou une corruption.

06

Load

Un load élevé peut provenir de l’I/O, pas seulement du CPU.

Prudence : certaines commandes de réparation (dpkg, fsck, firewall, Docker) peuvent modifier le système. Le générateur de rapport express n’utilise que des commandes de lecture.
Field troubleshooting

Center mission

8 playbooks

Qualify a Linux incident by service, resources, storage, network, DNS, SSH, permissions and packages, collecting systemd state and logs first.

Quick triage

  • Record uptime, load, memory and disk space.
  • Identify the actually affected service or process.
  • Read journalctl for the incident window.
  • Validate IP, route and DNS before network applications.
  • Keep a configuration copy before making changes.

Decision tree

Service failed→

Use systemctl status + journalctl, then dependencies/configuration.

Whole server is slow→

Check load, memory, I/O and disk before rebooting.

Only networking is down→

Check link, address, route, DNS then firewall.

Error after update→

Read dpkg/apt logs and compare versions/configuration.

Intervention playbooks

Start read-only, collect evidence, then change one variable at a time.

01systemd service failedControlled change
Symptom

Service is failed/inactive or repeatedly restarting.

Checks

  • Read full status and exit code.
  • Inspect service logs and dependencies.
  • Validate configuration syntax before restart.

Commands / evidence

systemctl status <service> --no-pagerjournalctl -u <service> -n 100 --no-pagersystemctl list-dependencies <service>

Expected result

Failure cause is visible and service remains active after correction.

Corrective actions

  • Fix configuration/dependency then restart only this service.
  • Keep log output before rotation.

Escalate when

Binary crash, data corruption or critical service remains unstable.

02Disk or inodes fullControlled change
Symptom

No space left on device, services unable to write or apt fails.

Checks

  • Compare block and inode usage.
  • Identify growing directories.
  • Check logs, cache, snapshots or deleted-but-open files.

Commands / evidence

df -hTdf -ihdu -xhd1 /var | sort -hlsof +L1

Expected result

A precise consumer explains saturation and sustainable margin is restored.

Corrective actions

  • Reduce retention/clean only safe data.
  • Extend filesystem if growth is legitimate.

Escalate when

Critical filesystem, complex LVM/RAID or unidentified business data.

03High CPU / memory loadRead-only
Symptom

High load average, heavy swap or process monopolizing resources.

Checks

  • Separate CPU, I/O wait and memory pressure.
  • Identify dominant processes/threads.
  • Correlate with cron, backup or traffic.

Commands / evidence

uptimefree -hps aux --sort=-%cpu | head -20vmstat 1 5

Expected result

CPU/memory/I/O bottleneck is clearly identified.

Corrective actions

  • Address responsible process or schedule.
  • Avoid kill -9 as first action on a stateful service.

Escalate when

OOM killer, kernel stall or persistent saturation without identifiable process.

04No network connectivityRead-only
Symptom

Server can no longer reach gateway or network after reboot/change.

Checks

  • Check link, address and expected interface.
  • Read routing table.
  • Check NetworkManager/systemd-networkd/ifupdown as applicable.

Commands / evidence

ip -br addrip routeip -s linkping -c 4 <gateway>

Expected result

Interface is up, address is correct and default route usable.

Corrective actions

  • Fix persistent configuration rather than temporary ip addr change.
  • Check VLAN/hypervisor if OS link looks correct.

Escalate when

Complex bond/bridge/VLAN, asymmetric route or upstream loss.

05DNS failureRead-only
Symptom

IP ping works but names no longer resolve.

Checks

  • Read resolv.conf and effective resolver.
  • Test DNS server explicitly.
  • Check search domains and systemd-resolved if used.

Commands / evidence

cat /etc/resolv.confresolvectl statusdig example.comdig @<DNS> example.com

Expected result

Resolver answers without timeout and returns expected address.

Corrective actions

  • Fix DNS configuration source (DHCP/netplan/resolved), not only generated resolv.conf.
  • Test internal and external names separately.

Escalate when

Internal authoritative DNS unavailable or UDP/TCP 53 filtering outside server.

06SSH unreachableControlled change
Symptom

Timeout, connection refused or authentication failed on SSH.

Checks

  • Separate unreachable port from authentication failure.
  • Check sshd, listener and firewall.
  • Read auth.log/journal for user/key.

Commands / evidence

systemctl status ssh --no-pagerss -lntp | grep :22journalctl -u ssh -n 100 --no-pagerssh -vvv <user>@<host>

Expected result

sshd listens and log precisely explains acceptance or rejection.

Corrective actions

  • Fix key/permissions/config then test a second session before closing first.
  • Run sshd -t before reload.

Escalate when

Only remote access path, external firewall or PAM/SSSD/LDAP issue.

07Permission deniedControlled change
Symptom

Application or user cannot read/write/execute despite file existing.

Checks

  • Read owner, group and mode through directory chain.
  • Check ACL and SELinux/AppArmor context if applicable.
  • Identify actual process UID/GID.

Commands / evidence

namei -l <path>getfacl <path>id <user>ps -o user,group,cmd -p <pid>

Expected result

A precise permission rule explains the failure.

Corrective actions

  • Apply minimum permission at correct level.
  • Avoid chmod -R 777 as workaround.

Escalate when

NFS/CIFS storage, complex inherited ACLs or mandatory security controls.

08APT / update errorControlled change
Symptom

apt update/upgrade fails, dpkg is locked or packages remain unconfigured.

Checks

  • Read exact error and configured repositories.
  • Check active apt/dpkg processes before removing a lock.
  • Check disk, DNS and time for TLS.

Commands / evidence

apt updatedpkg --auditps aux | egrep "apt|dpkg"journalctl -u apt-daily.service -n 50

Expected result

Repositories are reachable and dpkg has no broken package.

Corrective actions

  • Repair identified package or repository configuration.
  • Never remove a lock while dpkg is genuinely active.

Escalate when

Interrupted major upgrade, critical dependency breakage or essential third-party repository unavailable.

End-of-intervention checklist

  • Check systemctl --failed.
  • Check disk space and load after fix.
  • Retest service from its real client.
  • Archive useful commands and log excerpts.
  • Document changed configuration or package.

Continue in BAOI

Related cheat sheetLinux — essential commands IT toolsCalculate, inspect or generate without leaving the workflow. ProceduresFollow a controlled implementation procedure. Known failuresCross-check the symptom with known failure patterns.

See also:. LVM.

See also:. SELinux.

See also:. chmod.

♡ 0