Commit bacc2e19 authored by Vincent Pelletier's avatar Vincent Pelletier

Add activity validation/execution monitoring scripts.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18111 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 487286c7
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage:\n $0 <db_name>"
exit 1
fi
watch -n 5 "mysql -h localhost -u root -t '$1' --disable-pager -t -e 'SELECT count(path) as MESSAGE, method_id, processing as run, processing_node as node FROM message WHERE processing_node > -1 GROUP BY method_id, processing, processing_node; SELECT count(path) as MESSAGE_QUEUE, method_id, processing as run, processing_node as node FROM message_queue WHERE processing_node > -1 GROUP BY method_id, processing, processing_node' "
#!/bin/sh
if [ $# -ne 2 ]; then
echo -e "Usage:\n $0 db_name table_name"
exit 1
fi
watch -n 1 "mysql -u root -t '$1' --disable-pager -t -e ' SELECT count(*) as NEW FROM \`$2\` WHERE processing_node = -1; SELECT count(*) as VALID FROM \`$2\` WHERE processing_node = 0; SELECT count(*) as ASSIGNED FROM \`$2\` WHERE processing_node > 0; SELECT count(*) as PROCESSING FROM \`$2\` WHERE processing = 1; SELECT count(*) as ASSIGNED, processing_node as node FROM \`$2\` WHERE processing_node > 0 GROUP BY processing_node; SELECT count(*) as PROCESSING, processing_node as node FROM \`$2\` WHERE processing_node > 0 AND processing = 1 GROUP BY processing_node; SELECT count(*) as FAILURE FROM \`$2\` WHERE processing_node = -2; SELECT count(*) as ERROR FROM \`$2\` WHERE processing_node = -3;'"
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