소스 검색

Print PID

master
JustAnotherArchivist 5 년 전
부모
커밋
2b2c65f034
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      archivebot-list-stuck-requests

+ 1
- 1
archivebot-list-stuck-requests 파일 보기

@@ -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 'cmd' --no-headers | sed 's,^\s*,,; s,/usr/bin/python3.*/data/[^/]\+/\([0-9a-z]\+\)/wpull\.log.*$,\1,' | while read -r jobid; do echo $jobid; fs=$(find $(lsof -p $(pgrep -f $jobid) -F n | grep '^n.*tmp-' | sed 's,^n,,') -mmin +360 2> >(grep -v ': No such file or directory$' >&2)); if [[ "${fs}" ]]; then ls -al ${fs}; else echo 'None'; fi; echo; done
ps -C wpull --format 'cmd' --no-headers | sed 's,^\s*,,; s,/usr/bin/python3.*/data/[^/]\+/\([0-9a-z]\+\)/wpull\.log.*$,\1,' | while read -r jobid; do pid=$(pgrep -f $jobid); echo "$jobid (PID $pid)"; fs=$(find $(lsof -p $pid -F n | grep '^n.*tmp-' | sed 's,^n,,') -mmin +360 2> >(grep -v ': No such file or directory$' >&2)); if [[ "${fs}" ]]; then ls -al ${fs}; else echo 'None'; fi; echo; done

불러오는 중...
취소
저장