fix(backfill): Survey-Aufruf ohne --node, Hinweis auf Zeilenpufferung
Der Survey kennt kein argparse — '--node' wurde still ignoriert (harmlos, aber irrefuehrend). Argument entfernt und die Puffer-Falle im Aufruf dokumentiert.
This commit is contained in:
1 parent
df2ee94613
commit
c18263e4ed
1 file changed
+5
-1
@@ -37,7 +37,11 @@ log "Bestandsaufnahme der Apache-Logs (aendert nichts) …"
|
|||||||
mkdir -p /tmp/x22-archiv
|
mkdir -p /tmp/x22-archiv
|
||||||
curl -fsSL -m 30 "$REPO_RAW/scripts/apache-log-survey.py" -o /tmp/x22-archiv/survey.py \
|
curl -fsSL -m 30 "$REPO_RAW/scripts/apache-log-survey.py" -o /tmp/x22-archiv/survey.py \
|
||||||
|| die "survey.py konnte nicht geladen werden."
|
|| die "survey.py konnte nicht geladen werden."
|
||||||
python3 /tmp/x22-archiv/survey.py --node "$NODE" 2>&1 | tee /tmp/x22-archiv/bestand.txt
|
# ACHTUNG: der Survey kennt KEIN --node (er beschreibt nur den lokalen Host).
|
||||||
|
# Der Fortschritt wird nach stdout UND in die Datei geschrieben; das Skript
|
||||||
|
# erzwingt Zeilenpufferung, sonst bleibt bestand.txt bei einer Pipe bis zum
|
||||||
|
# Prozessende leer und der laufende Scan sieht wie ein Haenger aus.
|
||||||
|
python3 /tmp/x22-archiv/survey.py 2>&1 | tee /tmp/x22-archiv/bestand.txt
|
||||||
|
|
||||||
# Wie viel Historie liegt wirklich vor? Das entscheidet ueber den Nutzen.
|
# Wie viel Historie liegt wirklich vor? Das entscheidet ueber den Nutzen.
|
||||||
FILES=$(find /var/log/apache2 /home/users -name 'access.log*' -o -name 'error.log*' 2>/dev/null | wc -l)
|
FILES=$(find /var/log/apache2 /home/users -name 'access.log*' -o -name 'error.log*' 2>/dev/null | wc -l)
|
||||||
|
|||||||
Reference in new issue
Block a user