Files
felhom.eu/documentation/audits/n100-clock-2026-11-11/tools/chrony-read.sh
T
admin d4c7e84c22
gates / gates (push) Successful in 3m34s
Golden 0.352.0 vouched; token fix finished; why the N100 keeps no time; certificate pin spike on demo-hp
- Golden 0.352.0: bake, publish, one fresh install, the operator's vouch (R-468).
- No clone holds a login in its address; the credential helper script is in the repository (R-925, R-1390).
- N100 clock: a stale cached AppArmor profile stops chrony (R-1301, new R-1388). Read only.
- Certificate pin spike on demo-hp (R-1380): the break, the proven hand repair (runbook), the CA-file test,
  03-host-agent.md 12a, decision D80.
- Rulings of 13:17 written down (09 decisions 297-302). Register 245 -> 248 (R-1388, R-1389, R-1390).
- Docs, evidence and one helper script. No release, no floor change, no hub deploy.

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-11 15:15:20 +01:00

27 lines
3.1 KiB
Bash

# READ ONLY. Part 3: the time service on a Proxmox host.
echo "#### host $(hostname) $(date -u +%FT%TZ) local $(date +%T%z)"
echo "## versions"; pveversion; dpkg -l chrony systemd systemd-timesyncd 2>/dev/null | grep '^[a-z][a-z] ' | awk '{print $1,$2,$3}'
uname -r
echo "## unit state"; systemctl show chrony -p ActiveState -p SubState -p Result -p Type -p NotifyAccess -p ExecMainStatus -p ExecMainCode -p NRestarts -p ActiveEnterTimestamp -p InactiveEnterTimestamp -p FragmentPath -p DropInPaths -p UnitFileState -p PIDFile
echo "## unit cat"; systemctl cat chrony 2>&1
echo "## files"; ls -la /etc/systemd/system/chrony.service.d /etc/systemd/system/chronyd.service.d /usr/lib/systemd/system/chrony.service /lib/systemd/system/chrony.service /etc/systemd/system/chrony.service /etc/systemd/system/chronyd.service 2>&1
echo "## dpkg verify chrony"; dpkg -V chrony 2>&1; echo "rc=$?"
echo "## conf"; ls -la /etc/chrony /etc/chrony/conf.d /etc/chrony/sources.d 2>&1; grep -v '^\s*#' /etc/chrony/chrony.conf 2>&1 | grep -v '^$'; for f in /etc/chrony/conf.d/* /etc/chrony/sources.d/*; do [ -f "$f" ] && { echo "-- $f"; grep -v '^\s*#' "$f" | grep -v '^$'; }; done
echo "## default"; cat /etc/default/chrony 2>&1 | grep -v '^#'
echo "## apparmor"; aa-status 2>/dev/null | grep -i chrony; ls -la /etc/apparmor.d/usr.sbin.chronyd /etc/apparmor.d/local/usr.sbin.chronyd /etc/apparmor.d/disable 2>&1; cat /etc/apparmor.d/local/usr.sbin.chronyd 2>/dev/null | grep -v '^#'
echo "## apparmor profile notify lines"; grep -n 'notify\|/run/systemd' /etc/apparmor.d/usr.sbin.chronyd 2>&1
echo "## kernel audit lines for chronyd (last 20)"; journalctl -k --no-pager 2>/dev/null | grep -i 'chrony' | tail -20 | cut -c1-330
echo "## journal chrony this boot"; journalctl -u chrony -b --no-pager 2>&1 | tail -40 | cut -c1-300
echo "## first failure ever in the journal"; journalctl -u chrony --no-pager 2>/dev/null | grep -m3 'NOTIFY_SOCKET' | cut -c1-200; echo "count: $(journalctl -u chrony --no-pager 2>/dev/null | grep -c 'NOTIFY_SOCKET')"
echo "## oldest journal line"; journalctl --no-pager 2>/dev/null | head -1 | cut -c1-80
echo "## last good start in the journal"; journalctl -u chrony --no-pager 2>/dev/null | grep 'Started chrony\|Selected source' | tail -3 | cut -c1-200
echo "## boots"; journalctl --list-boots --no-pager 2>/dev/null | tail -6
echo "## what starts with it"; systemctl list-dependencies --after chrony 2>/dev/null | head -25; systemd-analyze critical-chain chrony.service 2>&1 | head -12
echo "## other time services"; systemctl is-active systemd-timesyncd ntp ntpsec openntpd 2>&1 | tr '\n' ' '; echo; timedatectl 2>&1
echo "## chronyc"; chronyc tracking 2>&1 | head -8; chronyc sources 2>&1 | tail -6
echo "## dpkg history chrony/apparmor/systemd"; zgrep -h ' chrony\| apparmor:\| systemd:' /var/log/dpkg.log* 2>/dev/null | grep ' upgrade \| install \|configure ' | sort | tail -25
echo "## felhom files that name chrony"; grep -rl chrony /etc/felhom* /usr/local/sbin /usr/local/bin /etc/systemd/system 2>/dev/null | head;
echo "## ps"; ps -eo pid,user,args | grep '[c]hronyd'
echo "## run dir"; ls -la /run/chrony /run/systemd/notify 2>&1
echo "## uptime"; uptime -s