<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.il
        {mso-style-name:il;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I believe the statement ID you retrieve from the monitor is the same one that gets logged.&nbsp; So you should be able to check the ID of any queries still executing and locate them in the logs.&nbsp; <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>E.g. id 202 in this logged entry:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp; DEBUG [mdx] <span style='background:yellow;mso-highlight:yellow'>202</span>: select [Gender].[Gender].Members ON COLUMNS<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Alternatively, just look at the logs for queries that have started but not finished.&nbsp; <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] <b>On Behalf Of </b>Domen Pogacnik<br><b>Sent:</b> Monday, March 11, 2013 10:10 AM<br><b>To:</b> mondrian@pentaho.org<br><b>Subject:</b> Re: [Mondrian] retrieve currently executing sql queries<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>I know about sql and mdx log, but I would actually like to get the current state of Mondrian i.e. which queries / mdx statements / tasks are currently in execution.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>To better understand my problem, I often get the following error:</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:white'>Mondrian Error:The number of&nbsp;</span><span class=il><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:#FFFFCC'>concurrent</span></span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:white'>&nbsp;</span><span class=il><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:#FFFFCC'>MDX</span></span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:white'>&nbsp;statements which can be processed simultaneously by this Mondrian server instance has been reached. Set 'mondrian.rolap.maxQueryThreads' to change the current limit.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:#222222'>All the&nbsp;consequential mdx queries after that error fails to execute (even if I wait for 300s). I suspect that there are MDX queries which fail to finish and I would like to see which.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>Best,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>Domen<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'><o:p>&nbsp;</o:p></span></p></div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>Date: Fri, 8 Mar 2013 13:10:01 -0600<br>From: Matt Campbell &lt;</span><a href="mailto:mcampbell@pentaho.com" target="_blank"><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1155CC'>mcampbell@pentaho.com</span></a><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>&gt;<br>Subject: Re: [Mondrian] retrieve currently executing sql queries<br>To: Mondrian developer mailing list &lt;</span><a href="mailto:mondrian@pentaho.org" target="_blank"><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1155CC'>mondrian@pentaho.org</span></a><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>&gt;<br>Message-ID:<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;</span><a href="mailto:60DAC7BD8D63084E8252254DF3F1102009B4206981@MBX36.exg5.exghost.com" target="_blank"><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1155CC'>60DAC7BD8D63084E8252254DF3F1102009B4206981@MBX36.exg5.exghost.com</span></a><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>&gt;<br>Content-Type: text/plain; charset=&quot;us-ascii&quot;<br><br>A simple option is to turn on DEBUG logging in your log4j.xml. &nbsp;Setting both mondrian.sql and mondrian.mdx to DEBUG is often useful.<br><br>&nbsp; &nbsp;&lt;category name=&quot;mondrian.sql&quot;&gt;<br>&nbsp; &nbsp; &nbsp; &lt;priority value=&quot;DEBUG&quot;/&gt;<br>&nbsp; &nbsp; &nbsp; &lt;appender-ref ref=&quot;SQLLOG&quot;/&gt;<br>&nbsp; &nbsp;&lt;/category&gt;<br><br>&nbsp; &nbsp;&lt;category name=&quot;mondrian.mdx&quot;&gt;<br>&nbsp; &nbsp; &nbsp; &lt;priority value=&quot;DEBUG&quot;/&gt;<br>&nbsp; &nbsp; &nbsp; &lt;appender-ref ref=&quot;MDXLOG&quot;/&gt;<br>&nbsp; &nbsp;&lt;/category&gt;</span> <o:p></o:p></p></div></body></html>