Commit 2e4dff03 authored by Łukasz Nowak's avatar Łukasz Nowak

- use loop to avoid duplication

 - add information about priority


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29116 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 576fdf28
......@@ -29,13 +29,12 @@ if [ "$INTERVAL" == "" ] ; then
INTERVAL=5
fi
SELECT="""
SELECT count(path) AS message, method_id, processing, processing_node FROM message GROUP BY method_id, processing, processing_node;
SELECT count(path) AS message_queue, method_id, processing, processing_node FROM message_queue GROUP BY method_id, processing, processing_node;
SELECT count(path) AS message, processing, processing_node FROM message GROUP BY processing, processing_node;
SELECT count(path) AS message_queue, processing, processing_node FROM message_queue GROUP BY processing, processing_node;
SELECT count(path) AS message_count FROM message;
SELECT count(path) AS message_queue_count FROM message_queue;
"""
SELECT=""
for t in message message_queue ; do
SELECT=$SELECT"""
SELECT count(path) AS $t, method_id, processing, processing_node AS node, min(priority) AS min_pri, max(priority) AS max_pri FROM $t GROUP BY method_id, processing, processing_node;
SELECT count(path) AS $t, processing, processing_node, min(priority) AS min_pri, max(priority) AS max_pri FROM $t GROUP BY processing, processing_node;
SELECT count(path) AS ${t}_count FROM $t;
"""
done
watch -n $INTERVAL "mysql $MYSQL_OPT --disable-pager -t -e '$SELECT' "
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment