PageRenderTime 29ms CodeModel.GetById 21ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/cistromescripts/kill_processes_over_1day.sh

https://bitbucket.org/cistrome/cistrome-harvard/
Shell | 13 lines | 5 code | 4 blank | 4 comment | 1 complexity | 9a1a9c619d746b4f162fd316fd035f45 MD5 | raw file
 1#!/bin/bash 
 2
 3# the account the cistrome server runs on in *nix system.
 4CISTROMEAP_ACCOUNT=cistromeap
 5
 6# this command return the processed run by cistromeap, sorted by
 7# elapsed time after the job is started.
 8ps --sort etime -u ${CISTROMEAP_ACCOUNT} -o etime=,pid=,args | grep -v paster.py | perl -ne 'print if /\-\d\d\:\d\d\:\d\d/' | perl -ane 'print $F[1],"\n"' > ps_jobs1day.txt
 9
10while read i;do kill -9 $i;done < ps_jobs1day.txt
11
12echo "Killed by ",`date`
13cat /data/CistromeAP/galaxy-dist/ps_jobs1day.txt