Created
August 24, 2015 23:56
-
-
Save anshultiwari1/a1ec5c377a09ab2cd6ed to your computer and use it in GitHub Desktop.
getting tractor tasks list with selected fields and saving them in datewise logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for jid in `./tq jobs "done and stoptime > -1d " -c jid,stoptime --nh | sort | awk '{print $1}'`; do echo ">>>>>>>>>>>$jid<<<<<<<<<<"; ./tq invocations "jid=$jid" -c jid,tid,wtime,current | grep -i true; echo ">>>>>>>>>>$jid<<<<<<<<<<<<<"; done | tee -a /tmp/task_stat_`date +%F`.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment