Browse Source

Fix line endings

master
JustAnotherArchivist 5 years ago
parent
commit
57ef544c6c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      archivebot-list-stuck-requests

+ 1
- 1
archivebot-list-stuck-requests View File

@@ -1,3 +1,3 @@
#!/bin/bash
# For each ArchiveBot job running on the machine, list requests that are stuck, i.e. older than 6 hours
ps -C wpull --format 'pid,cmd' --no-headers | sed 's,^\s*,,; s,\s*/usr/bin/python3.*/data/[^/]\+/\([0-9a-z]\+\)/wpull\.log.*$, \1,' | while read -r pid jobid; do echo "$jobid (PID $pid)"; find /proc/${pid}/fd -lname '*/tmp-wpull-warcsesreq-*' -printf "%l\0" | xargs -0 -r bash -c 'find "$@" -mmin +360 -printf "%TY-%Tm-%Td %TH:%TM:%TS %TZ\0%p\0"' bash 2> >(grep -v ': No such file or directory$' >&2) | while IFS= read -r -d '' mtime; IFS= read -r -d '' filename; do grep ^Host "${filename}" | while read -r outline; do printf '%s %q %s' "${mtime}" "${filename}" "${outline}"; done; done | sort | sed 's,\.[0-9]\+,,' | grep ^ || echo 'None'; echo; done
ps -C wpull --format 'pid,cmd' --no-headers | sed 's,^\s*,,; s,\s*/usr/bin/python3.*/data/[^/]\+/\([0-9a-z]\+\)/wpull\.log.*$, \1,' | while read -r pid jobid; do echo "$jobid (PID $pid)"; find /proc/${pid}/fd -lname '*/tmp-wpull-warcsesreq-*' -printf "%l\0" | xargs -0 -r bash -c 'find "$@" -mmin +360 -printf "%TY-%Tm-%Td %TH:%TM:%TS %TZ\0%p\0"' bash 2> >(grep -v ': No such file or directory$' >&2) | while IFS= read -r -d '' mtime; IFS= read -r -d '' filename; do grep ^Host "${filename}" | tr -d '\r' | while read -r outline; do printf '%s %q %s\n' "${mtime}" "${filename}" "${outline}"; done; done | sort | sed 's,\.[0-9]\+,,' | grep ^ || echo 'None'; echo; done

Loading…
Cancel
Save