gates / gates (push) Successful in 2m2s
Read-only review of every job on a timer and of everything that ends on a date, with measurements from the three test boxes. Nothing ends in the next 14 days. Register 236 -> 245 (R-1379..R-1387), pointer lines on twelve rows, D76-D79 in STATUS.md. Part C: felhom-agent's clone address holds no token now; the other clones wait for the operator's yes. R-1035's 4-week check moved to 2026-11-18 (operator read needed). Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
31 lines
5.2 KiB
Bash
31 lines
5.2 KiB
Bash
#!/bin/bash
|
|
# Clock list 2026-11-11 — host. READ-ONLY by construction: date, timedatectl (show), chronyc (read), systemctl list/show/cat,
|
|
# ls and cat of cron files, atq, journalctl (read), the PVE task index (read). It starts no job and writes no file.
|
|
set -u
|
|
M() { sed -E 's/((token|password|passwd|secret|apikey|api_key|authorization)[=: ]+)[^ ,;"]+/\1***/Ig'; }
|
|
h() { echo; echo "=== $* ==="; }
|
|
h "in-flight"; pgrep -x vzdump >/dev/null && echo "vzdump RUNNING"; pgrep -x apt-get >/dev/null && echo "apt RUNNING"; pgrep -f 'pct restore' >/dev/null && echo "restore RUNNING"; echo "checked"
|
|
h "clock"; date -u +'utc %FT%T.%NZ'; date +'local %FT%T %Z %z'; cat /etc/timezone 2>/dev/null; readlink /etc/localtime
|
|
timedatectl show 2>/dev/null; timedatectl 2>/dev/null
|
|
h "who keeps the time"; for u in chrony chronyd systemd-timesyncd ntp ntpsec openntpd; do printf '%s: ' $u; systemctl is-active $u 2>/dev/null; printf ' enabled: '; systemctl is-enabled $u 2>/dev/null; done
|
|
command -v chronyc >/dev/null && { chronyc -n tracking 2>&1; chronyc -n sources 2>&1; }
|
|
timedatectl timesync-status 2>&1 | head -12
|
|
/usr/bin/grep -v -E '^\s*(#|$)' /etc/chrony/chrony.conf 2>/dev/null; ls /etc/chrony/conf.d /etc/chrony/sources.d 2>/dev/null
|
|
/usr/bin/grep -v -E '^\s*(#|$)' /etc/systemd/timesyncd.conf 2>/dev/null
|
|
h "start with no time"; ls -l --time-style=full-iso /var/lib/systemd/timesync/clock /var/lib/chrony/ 2>&1 | head; dpkg -l fake-hwclock 2>/dev/null | tail -1; cat /etc/adjtime 2>/dev/null; hwclock --show --utc 2>&1 | head -2; cat /sys/class/rtc/rtc0/since_epoch 2>/dev/null; date -u +%s
|
|
h "boots"; uptime -s; journalctl --list-boots --no-pager 2>/dev/null | tail -6
|
|
h "timers"; systemctl list-timers --all --no-pager
|
|
h "timer units (all)"; for t in $(systemctl list-unit-files --type=timer --no-legend --no-pager | awk '{print $1}'); do echo "--- $t [$(systemctl is-enabled $t 2>/dev/null)/$(systemctl is-active $t 2>/dev/null)]"; systemctl cat $t 2>/dev/null | /usr/bin/grep -E '^(On|Persistent|RandomizedDelay|AccuracySec|Unit|FixedRandomDelay|WakeSystem)' ; systemctl show $t -p LastTriggerUSec -p NextElapseUSecRealtime -p Unit 2>/dev/null | tr '\n' ' '; echo; done
|
|
h "service limits of felhom + backup timers"; for t in $(systemctl list-unit-files --type=timer --no-legend --no-pager | awk '{print $1}' | /usr/bin/grep -i -E 'felhom|pve|pbs|apt|unattended|fstrim|logrotate|man-db|e2scrub|dpkg|smart'); do s=$(systemctl show $t -p Unit --value); echo "--- $s"; systemctl show "$s" -p TimeoutStartUSec -p RuntimeMaxUSec -p ExecStart -p Type -p ExecMainStartTimestamp -p ExecMainExitTimestamp -p ExecMainStatus 2>/dev/null | cut -c1-300 | M; done
|
|
h "felhom units that are not timers"; systemctl list-units --all --no-pager --no-legend 'felhom*' | awk '{print $1,$2,$3,$4}'
|
|
for s in $(systemctl list-unit-files --no-legend --no-pager 'felhom*.service' | awk '{print $1}'); do echo "--- $s"; systemctl show $s -p Restart -p RestartUSec -p WatchdogUSec -p TimeoutStartUSec -p RuntimeMaxUSec -p ActiveEnterTimestamp -p NRestarts 2>/dev/null | tr '\n' ' '; echo; done
|
|
h "cron"; /usr/bin/grep -v -E '^\s*(#|$)' /etc/crontab 2>/dev/null | M; for f in /etc/cron.d/*; do echo "--- $f"; /usr/bin/grep -v -E '^\s*(#|$)' "$f" | M; done; for d in hourly daily weekly monthly; do echo "--- cron.$d: $(ls /etc/cron.$d 2>/dev/null | tr '\n' ' ')"; done
|
|
echo "--- user crontabs: $(ls /var/spool/cron/crontabs 2>/dev/null | tr '\n' ' ')"; for f in /var/spool/cron/crontabs/*; do [ -f "$f" ] && { echo "--- $f"; /usr/bin/grep -v -E '^\s*(#|$)' "$f" | M; }; done
|
|
h "at"; command -v atq >/dev/null && atq 2>&1 || echo "no at"
|
|
h "pve jobs"; cat /etc/pve/jobs.cfg 2>/dev/null | M; echo "--- vzdump.cron"; /usr/bin/grep -v -E '^\s*(#|$)' /etc/pve/vzdump.cron 2>/dev/null; echo "--- vzdump.conf"; /usr/bin/grep -v -E '^\s*(#|$)' /etc/vzdump.conf 2>/dev/null
|
|
h "pve tasks (start end type id status), last 14 days"; cat /var/log/pve/tasks/index.1 /var/log/pve/tasks/index 2>/dev/null | awk -v now=$(date +%s) '{split($1,a,":"); st=strtonum("0x" a[5]); en=strtonum("0x" $2); if (now-st < 14*86400) printf "%s %s dur=%ds %s %s %s\n", strftime("%FT%T%z",st), strftime("%T",en), en-st, a[6], a[7], $3}' | /usr/bin/grep -v -E ' (vncproxy|vncshell|spiceproxy) ' | tail -150
|
|
h "runs of timer services, last 10 days (start/finish lines)"; for t in $(systemctl list-unit-files --type=timer --no-legend --no-pager | awk '{print $1}' | /usr/bin/grep -i -E 'felhom|pve-daily|apt-daily|pbs'); do s=$(systemctl show $t -p Unit --value); echo "--- $s"; journalctl -u "$s" --since '-10 days' -o short-iso --no-pager -q 2>/dev/null | /usr/bin/grep -E 'Starting|Started|Finished|Failed|Deactivated|Consumed' | tail -9 | cut -c1-220 | M; done
|
|
h "agent log: schedule words, last 3 days (tail 260)"; journalctl -u felhom-agent --since '-3 days' -o short-iso --no-pager -q 2>/dev/null | /usr/bin/grep -i -E 'night|vzdump|backup|restore.?test|osupdate|os-update|kernel|slot|window|schedul|prune|pbs|report (sent|fail)|clock|skew|drift|missed|catch.?up|deadline|timeout' | cut -c1-260 | M | tail -260
|
|
h "agent log: line count per hour, last 26 h"; journalctl -u felhom-agent --since '-26 hours' -o short-iso --no-pager -q 2>/dev/null | cut -c1-13 | sort | uniq -c | tr '\n' ' '
|
|
h "agent version"; /usr/local/bin/felhom-agent --version 2>&1 | head -1
|