Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
d4eda7ea
Commit
d4eda7ea
authored
Sep 15, 2020
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: show InnoDB history list length in console watcher
parent
b559f4c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
product/CMFActivity/bin/watch_activities
product/CMFActivity/bin/watch_activities
+3
-6
No files found.
product/CMFActivity/bin/watch_activities
View file @
d4eda7ea
...
...
@@ -32,6 +32,7 @@ INTERVAL=$2
}
node_priority_cols
=
"processing_node AS node, MIN(priority) AS min_pri, MAX(priority) AS max_pri"
count
=
'(SELECT count AS "InnoDB history list length" FROM information_schema.innodb_metrics WHERE name="trx_rseg_history_len") as i'
for
t
in
message:dict message_queue:queue message_job:joblib
;
do
table
=
${
t
%
:
*
}
t
=
${
t
#*
:
}
...
...
@@ -58,15 +59,11 @@ for t in message:dict message_queue:queue message_job:joblib; do
TIME_FORMAT(TIMEDIFF(UTC_TIMESTAMP(6), MAX(max_date)),
\"
%T
\"
) AS min,
TIME_FORMAT(TIMEDIFF(UTC_TIMESTAMP(6), MIN(min_date)),
\"
%T
\"
) AS max
FROM _
$t
GROUP BY priority ORDER BY priority;"
[
"
$count
"
]
&&
{
not_processing
=
$not_processing
" UNION ALL "
count
=
$count
,
}
not_processing
=
$not_processing
"
not_processing
=
${
not_processing
:+
$not_processing
UNION ALL
}
"
SELECT IFNULL(SUM(n),0) AS count,
$node_priority_cols
,
MIN(min_date) AS min_date, MAX(max_date) AS max_date
FROM _
$t
WHERE processing_node<=0 GROUP BY processing_node"
count
=
$count
"(SELECT IFNULL(SUM(n),0) AS
$t
FROM _
$t
) as
$t
"
count
=
$count
"
,
(SELECT IFNULL(SUM(n),0) AS
$t
FROM _
$t
) as
$t
"
total
=
$total
+
$t
done
exec
watch
-n
${
INTERVAL
:-
5
}
"
${
MYSQL
:-
mysql
}
$MYSQL_OPT
--disable-pager -t -e '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment