Browse Source

periodic-task-runtimes.sh: Separate between received and processed.

Ask Solem 15 years ago
parent
commit
525e7570ab
1 changed files with 13 additions and 1 deletions
  1. 13 1
      contrib/periodic-task-runtimes.sh

+ 13 - 1
contrib/periodic-task-runtimes.sh

@@ -32,7 +32,7 @@ usage () {
 [ -z "$query" -o -z "$hosts" ] && usage
 
 
-get_processed_date_for_task () {
+get_received_date_for_task () {
     host="$1"
     ssh "$USER@$host" "
         grep '$query' $CELERYD_LOGFILE | \
@@ -44,6 +44,18 @@ get_processed_date_for_task () {
     "
 }
 
+get_processed_date_for_task () {
+    host="$1"
+    ssh "$USER@$host" "
+        grep '$query' $CELERYD_LOGFILE | \
+            grep 'processed:' | \
+            perl -nle'
+                /^\[(.+?): INFO.+?Task\s+(.+?)\s*/;
+                print \"[\$1] $host \$2\"' | \
+            sed 's/\s*$//'
+    "
+}
+
 get_processed_for_all_hosts () {
     for_hosts="$*"
     for host in $for_hosts; do